<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0060)http://www.cnblogs.com/twodays/archive/2004/11/10/62226.html -->
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-cn"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><script async="" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/analytics.js"></script>

<title>CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园</title>
<link type="text/css" rel="stylesheet" href="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/blog-common.css">
<link id="MainCss" type="text/css" rel="stylesheet" href="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/bundle-KJC.css">
<link title="RSS" type="application/rss+xml" rel="alternate" href="http://www.cnblogs.com/twodays/rss">
<link title="RSD" type="application/rsd+xml" rel="EditURI" href="http://www.cnblogs.com/twodays/rsd.xml">
<link type="application/wlwmanifest+xml" rel="wlwmanifest" href="http://www.cnblogs.com/twodays/wlwmanifest.xml">
<script async="" type="text/javascript" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/gpt.js"></script><script src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/jquery.js" type="text/javascript"></script>  
<script type="text/javascript">var currentBlogApp = 'twodays', cb_enable_mathjax=false;</script>
<script src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/blog-common.js" type="text/javascript"></script>
<script async="" type="text/javascript" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/pubads_impl_50.js"></script><style type="text/css">#yddContainer{display:block;font-family:Microsoft YaHei;position:relative;width:100%;height:100%;top:-4px;left:-4px;font-size:12px;border:1px solid}#yddTop{display:block;height:22px}#yddTopBorderlr{display:block;position:static;height:17px;padding:2px 28px;line-height:17px;font-size:12px;color:#5079bb;font-weight:bold;border-style:none solid;border-width:1px}#yddTopBorderlr .ydd-sp{position:absolute;top:2px;height:0;overflow:hidden}.ydd-icon{left:5px;width:17px;padding:0px 0px 0px 0px;padding-top:17px;background-position:-16px -44px}.ydd-close{right:5px;width:16px;padding-top:16px;background-position:left -44px}#yddKeyTitle{float:left;text-decoration:none}#yddMiddle{display:block;margin-bottom:10px}.ydd-tabs{display:block;margin:5px 0;padding:0 5px;height:18px;border-bottom:1px solid}.ydd-tab{display:block;float:left;height:18px;margin:0 5px -1px 0;padding:0 4px;line-height:18px;border:1px solid;border-bottom:none}.ydd-trans-container{display:block;line-height:160%}.ydd-trans-container a{text-decoration:none;}#yddBottom{position:absolute;bottom:0;left:0;width:100%;height:22px;line-height:22px;overflow:hidden;background-position:left -22px}.ydd-padding010{padding:0 10px}#yddWrapper{color:#252525;z-index:10001;background:url(chrome-extension://eopjamdnofihpioajgfdikhhbobonhbb/ab20.png);}#yddContainer{background:#fff;border-color:#4b7598}#yddTopBorderlr{border-color:#f0f8fc}#yddWrapper .ydd-sp{background-image:url(chrome-extension://eopjamdnofihpioajgfdikhhbobonhbb/ydd-sprite.png)}#yddWrapper a,#yddWrapper a:hover,#yddWrapper a:visited{color:#50799b}#yddWrapper .ydd-tabs{color:#959595}.ydd-tabs,.ydd-tab{background:#fff;border-color:#d5e7f3}#yddBottom{color:#363636}#yddWrapper{min-width:250px;max-width:400px;}</style><meta name="chromesniffer" id="chromesniffer_meta" content="{&quot;jQuery&quot;:&quot;1.7&quot;}"><script type="text/javascript" src="chrome-extension://homgcnaoacgigpkkljjjekpignblkeae/detector.js"></script><script type="text/javascript" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/osd.js"></script></head>
<body style="position: static;">
<a name="top"></a>

<table class="Framework" cellspacing="0" cellpadding="0" width="100%">
	<tbody><tr>
		<td colspan="3">
			
<div id="top">
<table cellpadding="10" cellspacing="0">
	<tbody><tr>
		<td nowrap="">
			<h1><a id="Header1_HeaderTitle" class="headermaintitle" href="http://www.cnblogs.com/twodays/">我的回收站</a></h1>
			技术文章、随笔、文摘及其它
		</td>
	</tr>
</tbody></table>
</div>
<div id="sub">
	<div id="sub-right">
<div class="BlogStats">posts - 126, comments - 857, trackbacks - 1, articles - 1</div></div>
	
&nbsp;
<a id="Header1_MyLinks1_HomeLink" href="http://www.cnblogs.com/">博客园</a>&nbsp;::
<a id="Header1_MyLinks1_MyHomeLink" href="http://www.cnblogs.com/twodays/">首页</a>&nbsp;::
<a id="Header1_MyLinks1_NewPostLink" rel="nofollow" href="http://i.cnblogs.com/EditPosts.aspx?opt=1">新随笔</a>&nbsp;::
<a id="Header1_MyLinks1_ContactLink" accesskey="9" rel="nofollow" href="http://space.cnblogs.com/msg/send/%e8%a2%ab%e9%81%97%e5%bc%83%e7%9a%84%e5%b0%8f%e6%8c%87">联系</a>&nbsp;::
<a id="Header1_MyLinks1_Syndication" href="http://www.cnblogs.com/twodays/rss">订阅</a>
<a id="Header1_MyLinks1_XMLLink" class="XMLLink" href="http://www.cnblogs.com/twodays/rss"><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/xml.gif" alt="订阅"></a>&nbsp;::
<a id="Header1_MyLinks1_Admin" rel="nofollow" href="http://i.cnblogs.com/">管理</a>

</div>
		</td>
	</tr>
	<tr>
		<td class="LeftCell">
			<div id="leftmenu">
            	
		            <div id="blog-calendar" style=""><table id="blogCalendar" class="Cal" cellspacing="0" cellpadding="0" title="日历">
	<tbody><tr><td colspan="7"><table class="CalTitle" cellspacing="0">
		<tbody><tr><td class="CalNextPrev"><a href="javascript:void(0);" onclick="loadBlogCalendar(&#39;2014/08/01&#39;);return false;">&lt;</a></td><td align="center">2014年9月</td><td class="CalNextPrev" align="right"><a href="javascript:void(0);" onclick="loadBlogCalendar(&#39;2014/10/01&#39;);return false;">&gt;</a></td></tr>
	</tbody></table></td></tr><tr><th class="CalDayHeader" align="center" abbr="日" scope="col">日</th><th class="CalDayHeader" align="center" abbr="一" scope="col">一</th><th class="CalDayHeader" align="center" abbr="二" scope="col">二</th><th class="CalDayHeader" align="center" abbr="三" scope="col">三</th><th class="CalDayHeader" align="center" abbr="四" scope="col">四</th><th class="CalDayHeader" align="center" abbr="五" scope="col">五</th><th class="CalDayHeader" align="center" abbr="六" scope="col">六</th></tr><tr><td class="CalOtherMonthDay" align="center">31</td><td align="center">1</td><td align="center">2</td><td align="center">3</td><td align="center">4</td><td align="center">5</td><td class="CalWeekendDay" align="center">6</td></tr><tr><td class="CalWeekendDay" align="center">7</td><td align="center">8</td><td align="center">9</td><td align="center">10</td><td align="center">11</td><td align="center">12</td><td class="CalWeekendDay" align="center">13</td></tr><tr><td class="CalWeekendDay" align="center">14</td><td align="center">15</td><td align="center">16</td><td align="center">17</td><td align="center">18</td><td align="center">19</td><td class="CalWeekendDay" align="center">20</td></tr><tr><td class="CalWeekendDay" align="center">21</td><td align="center">22</td><td align="center">23</td><td align="center">24</td><td align="center">25</td><td class="CalTodayDay" align="center">26</td><td class="CalWeekendDay" align="center">27</td></tr><tr><td class="CalWeekendDay" align="center">28</td><td align="center">29</td><td align="center">30</td><td class="CalOtherMonthDay" align="center">1</td><td class="CalOtherMonthDay" align="center">2</td><td class="CalOtherMonthDay" align="center">3</td><td class="CalOtherMonthDay" align="center">4</td></tr><tr><td class="CalOtherMonthDay" align="center">5</td><td class="CalOtherMonthDay" align="center">6</td><td class="CalOtherMonthDay" align="center">7</td><td class="CalOtherMonthDay" align="center">8</td><td class="CalOtherMonthDay" align="center">9</td><td class="CalOtherMonthDay" align="center">10</td><td class="CalOtherMonthDay" align="center">11</td></tr>
</tbody></table></div><script type="text/javascript">loadBlogDefaultCalendar();</script>
		            
<div id="cell">
<img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/icon-group.jpg" hspace="5" align="left" vspace="2"><h3>公告</h3>
<div id="news">
	<div id="blog-news"><div align="center">欢迎各位前往WPMind以获取Windows Phone最新开发技术和资讯信息！<br><a href="http://www.wpmind.com/"><img alt="www.WPMind.com" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/o_WPMindLogo.jpg" border="0"></a></div>
<hr>

<div align="left">
<div align="center"><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/mvpLogo.jpg" border="0"> <br><a href="https://mvp.support.microsoft.com/profile/Kenn">我的MVP配置(Mobile Devices)</a><br></div>
<div align="left">
<p>
</p><hr>
<font color="red">爱好<b>Windows Mobile开发</b>的朋友可以选择下列QQ群加入和大家进行讨论：<br>
</font>
QQ群: <br>27961100 
<br><br>

<br><font color="red">如果您只是Windows Mobile系统的玩家则请自行寻找其他Mobile应用相关QQ群，谢绝加入。<br></font>
<p></p>
</div></div>
<hr>

<div align="center"><!--Creative Commons License--><a href="http://creativecommons.org/licenses/by-nc-sa/2.5/cn/" rel="license"><img alt="Creative Commons License" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/somerights20.png" border="0"></a><br>This work is licensed under a <a href="http://creativecommons.org/licenses/by-nc-sa/2.5/cn/" rel="license">Creative Commons Attribution-NonCommercial-ShareAlike 2.5 China License</a>.<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
		<Work rdf:about="">
			<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.5/cn/" ></license>
	<dc:source rdf:resource="http://twodays.cnblogs.com" ></dc:source>
		</Work>
		<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.5/cn/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"></permits><permits rdf:resource="http://web.resource.org/cc/Distribution"></permits><requires rdf:resource="http://web.resource.org/cc/Notice"></requires><requires rdf:resource="http://web.resource.org/cc/Attribution"></requires><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"></prohibits><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"></permits><requires rdf:resource="http://web.resource.org/cc/ShareAlike"></requires></License></rdf:RDF> --> </div><br>
<hr><div id="profile_block">昵称：<a href="http://home.cnblogs.com/u/twodays/">被遗弃的小指</a><br>园龄：<a href="http://home.cnblogs.com/u/twodays/" title="入园时间：2004-06-25">10年3个月</a><br>荣誉：<a href="http://www.cnblogs.com/expert/">推荐博客</a><br>粉丝：<a href="http://home.cnblogs.com/u/twodays/followers/">50</a><br>关注：<a href="http://home.cnblogs.com/u/twodays/followees/">0</a><div id="p_b_follow"><a href="javascript:void(0);" onclick="cnblogs.UserManager.FollowBlogger(&#39;6d82310b-63cf-dd11-9e4d-001cf0cd104b&#39;)">+加关注</a></div></div></div><script type="text/javascript">loadBlogNews();</script>
</div>
</div>

	            
	            <div id="blog-sidecolumn">
<div id="cell">
<img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/icon-group.jpg" hspace="5" align="left" vspace="2">
<h3 class="catListTitle">搜索</h3>
<div id="widget_my_zzk" class="div_my_zzk"><input type="text" id="q" onkeydown="return zzk_go_enter(event);" class="input_my_zzk">&nbsp;<input onclick="zzk_go()" type="button" value="找找看" id="btnZzk" class="btn_my_zzk"></div>
<div id="widget_my_google" class="div_my_zzk"><input type="text" name="google_q" id="google_q" onkeydown="return google_go_enter(event)" class="input_my_zzk">&nbsp;<input onclick="google_go()" type="button" value="谷歌搜索" class="btn_my_zzk"></div>
</div>
<div id="cell">
<img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/icon-group.jpg" hspace="5" align="left" vspace="2">
<h3>常用链接</h3>
<ul>
<li><a href="http://www.cnblogs.com/twodays/p/" title="我的博客的随笔列表">我的随笔</a></li><li><a href="http://www.cnblogs.com/twodays/MyComments.html" title="我发表过的评论列表">我的评论</a></li><li><a href="http://www.cnblogs.com/twodays/OtherPosts.html" title="我评论过的随笔列表">我的参与</a></li><li><a href="http://www.cnblogs.com/twodays/RecentComments.html" title="我的博客的评论列表">最新评论</a></li><li><a href="http://www.cnblogs.com/twodays/tag/" title="我的博客的标签列表">我的标签</a></li>
<li><a id="itemListLink" onclick="this.blur();WarpClass(&#39;itemListLink&#39;, &#39;itemListLin_con&#39;);return false;" href="http://www.cnblogs.com/twodays/archive/2004/11/10/62226.html#">更多链接</a></li>
</ul>
<div id="itemListLin_con" style="display:none;">

</div>
</div>
<div id="cell">
<img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/icon-group.jpg" hspace="5" align="left" vspace="2">
<h3>我的标签</h3>
<div id="MyTag">
<ul>
<li><a href="http://www.cnblogs.com/twodays/tag/Windows%20Phone%207/">Windows Phone 7</a>(10)</li><li><a href="http://www.cnblogs.com/twodays/tag/WPMind/">WPMind</a>(10)</li><li><a href="http://www.cnblogs.com/twodays/tag/%E6%B4%BB%E5%8A%A8/">活动</a>(7)</li><li><a href="http://www.cnblogs.com/twodays/tag/WP7/">WP7</a>(7)</li><li><a href="http://www.cnblogs.com/twodays/tag/Windows%20Phone%207%20Series/">Windows Phone 7 Series</a>(2)</li><li><a href="http://www.cnblogs.com/twodays/tag/Silverlight/">Silverlight</a>(2)</li><li><a href="http://www.cnblogs.com/twodays/tag/Mango/">Mango</a>(2)</li><li><a href="http://www.cnblogs.com/twodays/tag/Marketplace/">Marketplace</a>(2)</li><li><a href="http://www.cnblogs.com/twodays/tag/Mobile%20Dev%20Day/">Mobile Dev Day</a>(2)</li><li><a href="http://www.cnblogs.com/twodays/tag/MS/">MS</a>(2)</li><li><a href="http://www.cnblogs.com/twodays/tag/">更多</a></li>
</ul>
</div>
</div>
		<div id="cell">
		<img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/icon-group.jpg" hspace="5" align="left" vspace="2"><h3>随笔分类</h3>
		
				<ul>
			
				<li><a id="CatList_LinkList_0_Link_0" href="http://www.cnblogs.com/twodays/category/5080.html">.NET技术(21)</a>
				</li>
			
				<li><a id="CatList_LinkList_0_Link_1" href="http://www.cnblogs.com/twodays/category/54594.html">Mobile业界信息(25)</a>
				</li>
			
				<li><a id="CatList_LinkList_0_Link_2" href="http://www.cnblogs.com/twodays/category/31631.html">Windows Mobile 团队Blog公告(31)</a>
				</li>
			
				<li><a id="CatList_LinkList_0_Link_3" href="http://www.cnblogs.com/twodays/category/19278.html">列车时刻表(13)</a>
				</li>
			
				<li><a id="CatList_LinkList_0_Link_4" href="http://www.cnblogs.com/twodays/category/5081.html">其他微软相关(7)</a>
				</li>
			
				<li><a id="CatList_LinkList_0_Link_5" href="http://www.cnblogs.com/twodays/category/7438.html">随便写点(8)</a>
				</li>
			
				<li><a id="CatList_LinkList_0_Link_6" href="http://www.cnblogs.com/twodays/category/28758.html">移动应用开发(71)</a>
				</li>
			
				</ul>
			</div>
	
		<div id="cell">
		<img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/icon-group.jpg" hspace="5" align="left" vspace="2"><h3>随笔档案</h3>
		
				<ul>
			
				<li><a id="CatList_LinkList_1_Link_0" href="http://www.cnblogs.com/twodays/archive/2011/07.html">2011年7月 (1)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_1" href="http://www.cnblogs.com/twodays/archive/2011/06.html">2011年6月 (2)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_2" href="http://www.cnblogs.com/twodays/archive/2011/05.html">2011年5月 (4)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_3" href="http://www.cnblogs.com/twodays/archive/2011/01.html">2011年1月 (1)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_4" href="http://www.cnblogs.com/twodays/archive/2010/12.html">2010年12月 (2)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_5" href="http://www.cnblogs.com/twodays/archive/2010/10.html">2010年10月 (3)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_6" href="http://www.cnblogs.com/twodays/archive/2010/09.html">2010年9月 (1)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_7" href="http://www.cnblogs.com/twodays/archive/2010/08.html">2010年8月 (3)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_8" href="http://www.cnblogs.com/twodays/archive/2010/07.html">2010年7月 (2)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_9" href="http://www.cnblogs.com/twodays/archive/2010/06.html">2010年6月 (7)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_10" href="http://www.cnblogs.com/twodays/archive/2010/05.html">2010年5月 (5)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_11" href="http://www.cnblogs.com/twodays/archive/2010/04.html">2010年4月 (2)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_12" href="http://www.cnblogs.com/twodays/archive/2010/03.html">2010年3月 (1)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_13" href="http://www.cnblogs.com/twodays/archive/2009/12.html">2009年12月 (1)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_14" href="http://www.cnblogs.com/twodays/archive/2008/12.html">2008年12月 (1)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_15" href="http://www.cnblogs.com/twodays/archive/2008/02.html">2008年2月 (1)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_16" href="http://www.cnblogs.com/twodays/archive/2008/01.html">2008年1月 (1)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_17" href="http://www.cnblogs.com/twodays/archive/2007/12.html">2007年12月 (2)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_18" href="http://www.cnblogs.com/twodays/archive/2007/11.html">2007年11月 (4)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_19" href="http://www.cnblogs.com/twodays/archive/2007/10.html">2007年10月 (8)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_20" href="http://www.cnblogs.com/twodays/archive/2007/09.html">2007年9月 (1)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_21" href="http://www.cnblogs.com/twodays/archive/2007/07.html">2007年7月 (2)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_22" href="http://www.cnblogs.com/twodays/archive/2007/05.html">2007年5月 (3)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_23" href="http://www.cnblogs.com/twodays/archive/2007/03.html">2007年3月 (2)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_24" href="http://www.cnblogs.com/twodays/archive/2007/02.html">2007年2月 (2)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_25" href="http://www.cnblogs.com/twodays/archive/2007/01.html">2007年1月 (4)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_26" href="http://www.cnblogs.com/twodays/archive/2006/12.html">2006年12月 (1)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_27" href="http://www.cnblogs.com/twodays/archive/2006/09.html">2006年9月 (2)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_28" href="http://www.cnblogs.com/twodays/archive/2006/08.html">2006年8月 (1)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_29" href="http://www.cnblogs.com/twodays/archive/2006/07.html">2006年7月 (1)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_30" href="http://www.cnblogs.com/twodays/archive/2006/06.html">2006年6月 (3)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_31" href="http://www.cnblogs.com/twodays/archive/2006/05.html">2006年5月 (4)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_32" href="http://www.cnblogs.com/twodays/archive/2006/04.html">2006年4月 (5)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_33" href="http://www.cnblogs.com/twodays/archive/2006/03.html">2006年3月 (2)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_34" href="http://www.cnblogs.com/twodays/archive/2005/12.html">2005年12月 (1)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_35" href="http://www.cnblogs.com/twodays/archive/2005/11.html">2005年11月 (2)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_36" href="http://www.cnblogs.com/twodays/archive/2005/10.html">2005年10月 (3)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_37" href="http://www.cnblogs.com/twodays/archive/2005/09.html">2005年9月 (2)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_38" href="http://www.cnblogs.com/twodays/archive/2005/08.html">2005年8月 (3)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_39" href="http://www.cnblogs.com/twodays/archive/2005/07.html">2005年7月 (12)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_40" href="http://www.cnblogs.com/twodays/archive/2005/06.html">2005年6月 (6)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_41" href="http://www.cnblogs.com/twodays/archive/2005/04.html">2005年4月 (1)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_42" href="http://www.cnblogs.com/twodays/archive/2005/02.html">2005年2月 (4)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_43" href="http://www.cnblogs.com/twodays/archive/2004/11.html">2004年11月 (1)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_44" href="http://www.cnblogs.com/twodays/archive/2004/07.html">2004年7月 (3)</a>
				</li>
			
				<li><a id="CatList_LinkList_1_Link_45" href="http://www.cnblogs.com/twodays/archive/2004/06.html">2004年6月 (2)</a>
				</li>
			
				</ul>
			</div>
	
		<div id="cell">
		<img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/icon-group.jpg" hspace="5" align="left" vspace="2"><h3>=_=</h3>
		
				<ul>
			
				<li><a id="CatList_LinkList_2_Link_0" href="http://xreader.winfans.net/" rel="nofollow" target="_blank">Xreader小说集合器</a>
				</li>
			
				<li><a id="CatList_LinkList_2_Link_1" href="http://blog.csdn.net/mengxuwq/" rel="nofollow" target="_blank">魏群</a>
				</li>
			
				<li><a id="CatList_LinkList_2_Link_2" href="http://breakstring.spaces.live.com/" rel="nofollow" target="_blank">我的回收站 @ Live.com</a>
				</li>
			
				</ul>
			</div>
	
		<div id="cell">
		<img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/icon-group.jpg" hspace="5" align="left" vspace="2"><h3>技术天地</h3>
		
				<ul>
			
				<li><a id="CatList_LinkList_3_Link_0" href="http://blogs.msdn.com/csharpfaq" rel="nofollow" target="_blank">C# FAQ</a>
				</li>
			
				<li><a id="CatList_LinkList_3_Link_1" href="http://www.csdn.net/" rel="nofollow" target="_blank">CSDN</a>
				</li>
			
				<li><a id="CatList_LinkList_3_Link_2" href="http://www.microsoft.com/china/MSDN" rel="nofollow" target="_blank">MSDN中文站</a>
				</li>
			
				<li><a id="CatList_LinkList_3_Link_3" href="http://www.umlchina.com/" rel="nofollow" target="_blank">UMLChina</a>
				</li>
			
				<li><a id="CatList_LinkList_3_Link_4" href="http://www.uml.org.cn/" rel="nofollow" target="_blank">UML软件工程组织</a>
				</li>
			
				<li><a id="CatList_LinkList_3_Link_5" href="http://www.mscommunity.com/article/" rel="nofollow" target="_blank">微软中国社区精华文章</a>
				</li>
			
				<li><a id="CatList_LinkList_3_Link_6" href="http://www.csai.cn/" rel="nofollow" target="_blank">中国系统分析员</a>
				</li>
			
				</ul>
			</div>
	
		<div id="cell">
		<img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/icon-group.jpg" hspace="5" align="left" vspace="2"><h3>走过路过不要错过</h3>
		
				<ul>
			
				<li><a id="CatList_LinkList_4_Link_0" href="http://andersliu.cnblogs.com/" rel="nofollow" target="_blank">Anders Liu的Blog</a>
				</li>
			
				<li><a id="CatList_LinkList_4_Link_1" href="http://maqi.spaces.live.com/" rel="nofollow" target="_blank">Lucky Ma的Blog</a>
				</li>
			
				<li><a id="CatList_LinkList_4_Link_2" href="http://upto.cnblogs.com/" rel="nofollow" target="_blank">黎波的Blog</a>
				</li>
			
				<li><a id="CatList_LinkList_4_Link_3" href="http://blog.csdn.net/aawolf" rel="nofollow" target="_blank">马宁的Blog</a>
				</li>
			
				</ul>
			</div>
	<div id="topview_posts_wrap">
    <div id="cell">
        <img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/icon-group.jpg" hspace="5" align="left" vspace="2">
        <h3>阅读排行榜</h3>
        <div class="RecentComment">
            <div id="TopViewPostsBlock"><ul><li><a href="http://www.cnblogs.com/twodays/archive/2005/06/30/184107.html">1. Windows Mobile 开发常用资源下载地址(13856)</a></li><li><a href="http://www.cnblogs.com/twodays/archive/2005/02/24/108457.html">2. 列车时刻表查询器0.6版（SmartPhone版）发布，采用了SQLite数据引擎，欢迎下载试用。(6436)</a></li><li><a href="http://www.cnblogs.com/twodays/archive/2005/12/13/296311.html">3. 关于.NET中的整数除法(4382)</a></li><li><a href="http://www.cnblogs.com/twodays/archive/2007/05/30/WMTF1.html">4. 使用Windows Mobile Test Framework进行Windows Mobile程序的自动化测试 - (1)微软Windows Mobile Test Framework简介(4283)</a></li><li><a href="http://www.cnblogs.com/twodays/archive/2007/02/11/WM6.html">5. 身为开发人员的您，准备好迎接Widows Mobile 6了吗？(4198)</a></li></ul></div>
        </div>
    </div>
</div><div id="topfeedback_posts_wrap">
    <div id="cell">
        <img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/icon-group.jpg" hspace="5" align="left" vspace="2">
        <h3>评论排行榜</h3>
        <div class="RecentComment">
            <div id="TopFeedbackPostsBlock"><ul><li><a href="http://www.cnblogs.com/twodays/archive/2005/07/11/190549.html">1. Windows Mobile 应用开发团队开张咯(339)</a></li><li><a href="http://www.cnblogs.com/twodays/archive/2005/02/24/108457.html">2. 列车时刻表查询器0.6版（SmartPhone版）发布，采用了SQLite数据引擎，欢迎下载试用。(32)</a></li><li><a href="http://www.cnblogs.com/twodays/archive/2005/06/17/176079.html">3. 列车时刻表0.8版(for SmartPhone Edition)发布，敬请各位下载试用点评。(31)</a></li><li><a href="http://www.cnblogs.com/twodays/archive/2005/02/19/106163.html">4. “基于.NET CF的火车时刻查询器”试用邀请 兼开发手记(26)</a></li><li><a href="http://www.cnblogs.com/twodays/archive/2004/07/19/25562.html">5. 反驳 吕震宇的“小议数据库主键选取策略（原创）”(23)</a></li></ul></div>
        </div>
    </div>    
</div>
<div id="topdigg_posts_wrap">
<div id="cell">
<img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/icon-group.jpg" hspace="5" align="left" vspace="2"><h3>推荐排行榜</h3>
<div class="RecentComment">
	<div id="TopDiggPostsBlock"><ul><li><a href="http://www.cnblogs.com/twodays/archive/2011/05/31/whats-new-in-mango-for-dev-3.html">1. 你不可不知的Mango — 开发者篇（3）(6)</a></li><li><a href="http://www.cnblogs.com/twodays/archive/2011/05/26/whats-new-in-mango-for-dev-1.html">2. 你不可不知的Mango — 开发者篇（1）(6)</a></li><li><a href="http://www.cnblogs.com/twodays/archive/2011/05/27/whats-new-in-mango-for-dev-2.html">3. 你不可不知的Mango — 开发者篇（2）(5)</a></li><li><a href="http://www.cnblogs.com/twodays/archive/2011/06/10/android_to_wp.html">4. 微软发布Android应用的WP7迁移指导工具(4)</a></li><li><a href="http://www.cnblogs.com/twodays/archive/2011/06/09/whats-new-in-mango-for-dev-4.html">5. 你不可不知的Mango — 开发者篇（4）(3)</a></li></ul></div>
</div>
</div></div></div><script type="text/javascript">loadBlogSideColumn();</script>
			</div>
		</td>
		<td class="MainCell">
			<div id="main">
				

	<div class="post">
		<div class="posthead">
			<h2>
				<a id="cb_post_title_url" class="singleposttitle" href="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园.htm">CodeDOM：集合类生成器</a>
			</h2>
 			Posted on <span id="post-date">2004-11-10 11:45</span> <a href="http://www.cnblogs.com/twodays/">被遗弃的小指</a> 阅读(<span id="post_view_count">1576</span>) 评论(<span id="post_comment_count">6</span>)  <a href="http://i.cnblogs.com/EditPosts.aspx?postid=62226" rel="nofollow">编辑</a> <a href="http://www.cnblogs.com/twodays/archive/2004/11/10/62226.html#" onclick="AddToWz(62226);return false;">收藏</a>
			<script type="text/javascript">var allowComments=true,isLogined=true,cb_blogId=3276,cb_entryId=62226,cb_blogApp=currentBlogApp,cb_blogUserGuid='6d82310b-63cf-dd11-9e4d-001cf0cd104b',cb_entryCreatedDate='2004/11/10 11:45:00';loadViewCount(cb_entryId);</script>
			
		</div>
		<div class="postbody"><div id="cnblogs_post_body"><p>写程序的时候，写那些集合类真是麻烦，如果不自己写的话，通常我们会使用SharpDevelop或者CodeSmith来生成，他们生成代码的确比较好，但是相对来说还是比较麻烦些。<br>于是乎，就动手自己用CodeDOM写了一个程序，嗯哪，也算是练练手吧。<br>主要的代码如下：<br>
</p>
<div style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid">
    <div><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/None.gif" align="top"><span style="COLOR: #0000ff">using</span><span style="COLOR: #000000">&nbsp;System;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/None.gif" align="top"></span><span style="COLOR: #0000ff">using</span><span style="COLOR: #000000">&nbsp;System.CodeDom;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/None.gif" align="top"></span><span style="COLOR: #0000ff">using</span><span style="COLOR: #000000">&nbsp;System.CodeDom.Compiler;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/None.gif" align="top"></span><span style="COLOR: #0000ff">using</span><span style="COLOR: #000000">&nbsp;System.IO;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/None.gif" align="top"></span><span style="COLOR: #0000ff">using</span><span style="COLOR: #000000">&nbsp;Microsoft.CSharp;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/None.gif" align="top"></span><span style="COLOR: #0000ff">using</span><span style="COLOR: #000000">&nbsp;Microsoft.VisualBasic;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/None.gif" align="top"></span><span style="COLOR: #0000ff">using</span><span style="COLOR: #000000">&nbsp;Microsoft.VJSharp;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/None.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/None.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/None.gif" align="top"></span><span style="COLOR: #0000ff">namespace</span><span style="COLOR: #000000">&nbsp;Twodays.Tools.CollectionMaker<br><img id="Codehighlighter1_204_31269_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedBlockStart.gif" align="top"><img id="Codehighlighter1_204_31269_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedBlock.gif" align="top" style="DISPLAY: none"></span><span id="Codehighlighter1_204_31269_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/dot.gif"></span><span id="Codehighlighter1_204_31269_Open_Text"><span style="COLOR: #000000">{<br><img id="Codehighlighter1_207_257_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_207_257_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_207_257_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</span><span id="Codehighlighter1_207_257_Open_Text"><span style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;</span><span style="COLOR: #808080">&lt;summary&gt;</span><span style="COLOR: #008000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;该类用于生成一个强类型的集合类<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;</span><span style="COLOR: #808080">&lt;/summary&gt;</span><span style="COLOR: #808080"></span></span><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">sealed</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">class</span><span style="COLOR: #000000">&nbsp;StrongTypeCollection<br><img id="Codehighlighter1_301_31267_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_301_31267_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_301_31267_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/dot.gif"></span><span id="Codehighlighter1_301_31267_Open_Text"><span style="COLOR: #000000">{<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">private</span><span style="COLOR: #000000">&nbsp;StrongTypeCollection()<br><img id="Codehighlighter1_338_342_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_338_342_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_338_342_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/dot.gif"></span><span id="Codehighlighter1_338_342_Open_Text"><span style="COLOR: #000000">{<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">&nbsp;COPYRIGHT_INFO</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">TWODAYS&nbsp;CollectionMaker</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">private</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">static</span><span style="COLOR: #000000">&nbsp;CodeCompileUnit&nbsp;Build(</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">&nbsp;nameSpace,</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">&nbsp;itemClassName,</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">&nbsp;collectionClassName)<br><img id="Codehighlighter1_515_20619_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_515_20619_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_515_20619_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/dot.gif"></span><span id="Codehighlighter1_515_20619_Open_Text"><span style="COLOR: #000000">{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CodeCompileUnit&nbsp;CompileUnit&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCompileUnit();<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img id="Codehighlighter1_590_1672_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top"><img id="Codehighlighter1_590_1672_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_590_1672_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">增加文件的整体信息</span><span id="Codehighlighter1_590_1672_Open_Text" style="DISPLAY: none"><span style="COLOR: #0000ff">#region</span><span style="COLOR: #000000">&nbsp;增加文件的整体信息</span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CodeNamespace&nbsp;codeNamespace&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeNamespace(nameSpace);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;codeNamespace.Comments.Clear();<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;codeNamespace.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">-------------------------------------------------------------</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;,</span><span style="COLOR: #0000ff">false</span><span style="COLOR: #000000">)&nbsp;);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;codeNamespace.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">""</span><span style="COLOR: #000000">&nbsp;,</span><span style="COLOR: #0000ff">false</span><span style="COLOR: #000000">)&nbsp;);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;codeNamespace.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Powered&nbsp;By：&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;COPYRIGHT_INFO,</span><span style="COLOR: #0000ff">false</span><span style="COLOR: #000000">)&nbsp;);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;codeNamespace.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Created&nbsp;By：&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;System.Environment.UserName,</span><span style="COLOR: #0000ff">false</span><span style="COLOR: #000000">)&nbsp;);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;codeNamespace.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Created&nbsp;Time：&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;DateTime.Now.ToString(),</span><span style="COLOR: #0000ff">false</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;codeNamespace.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">""</span><span style="COLOR: #000000">&nbsp;,</span><span style="COLOR: #0000ff">false</span><span style="COLOR: #000000">)&nbsp;);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;codeNamespace.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">-------------------------------------------------------------</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;,</span><span style="COLOR: #0000ff">false</span><span style="COLOR: #000000">)&nbsp;);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;codeNamespace.Imports.Add(&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeNamespaceImport(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">System</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">)&nbsp;);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;codeNamespace.Imports.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeNamespaceImport(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">System.Collections</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CompileUnit.Namespaces.Add(&nbsp;codeNamespace&nbsp;);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">#endregion</span></span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img id="Codehighlighter1_1678_20590_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top"><img id="Codehighlighter1_1678_20590_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_1678_20590_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">增加集合类</span><span id="Codehighlighter1_1678_20590_Open_Text" style="DISPLAY: none"><span style="COLOR: #0000ff">#region</span><span style="COLOR: #000000">&nbsp;增加集合类</span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CodeTypeDeclaration&nbsp;collectionClass&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeTypeDeclaration(collectionClassName);<br><img id="Codehighlighter1_1783_2546_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top"><img id="Codehighlighter1_1783_2546_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_1783_2546_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">增加集合类的信息</span><span id="Codehighlighter1_1783_2546_Open_Text" style="DISPLAY: none"><span style="COLOR: #0000ff">#region</span><span style="COLOR: #000000">&nbsp;增加集合类的信息</span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;collectionClass.BaseTypes.Add(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">CollectionBase</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;collectionClass.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;summary&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;collectionClass.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;para&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;collectionClass.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">A&nbsp;collection&nbsp;that&nbsp;stores&nbsp;&lt;see&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">itemClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">'/&gt;&nbsp;objects.</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;collectionClass.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;/para&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;collectionClass.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;/summary&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;collectionClass.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;seealso&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;collectionClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">'/&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;collectionClass.CustomAttributes.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeAttributeDeclaration(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Serializable</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;codeNamespace.Types.Add(collectionClass);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">#endregion</span></span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img id="Codehighlighter1_2552_2776_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top"><img id="Codehighlighter1_2552_2776_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_2552_2776_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">子项目数组的引用</span><span id="Codehighlighter1_2552_2776_Open_Text" style="DISPLAY: none"><span style="COLOR: #0000ff">#region</span><span style="COLOR: #000000">&nbsp;子项目数组的引用</span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CodeTypeReference&nbsp;itemArrayReference</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeTypeReference(itemClassName)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;itemArrayReference.ArrayElementType&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeTypeReference(itemClassName)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;itemArrayReference.ArrayRank</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">#endregion</span></span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img id="Codehighlighter1_2782_3962_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top"><img id="Codehighlighter1_2782_3962_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_2782_3962_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">构造函数</span><span id="Codehighlighter1_2782_3962_Open_Text" style="DISPLAY: none"><span style="COLOR: #0000ff">#region</span><span style="COLOR: #000000">&nbsp;构造函数</span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;collectionClass.Members.Add(CreateConstructor(collectionClassName,</span><span style="COLOR: #000000">""</span><span style="COLOR: #000000">,</span><span style="COLOR: #000000">""</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CodeConstructor&nbsp;cc1</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">&nbsp;CreateConstructor(collectionClassName,</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;based&nbsp;on&nbsp;another&nbsp;&lt;see&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;collectionClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">'/&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">A&nbsp;&lt;see&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;collectionClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">'/&gt;&nbsp;from&nbsp;which&nbsp;the&nbsp;contents&nbsp;are&nbsp;copied</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cc1.Parameters.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeParameterDeclarationExpression(collectionClassName,</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">val</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CodeMethodInvokeExpression&nbsp;cc1_invoke</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeMethodInvokeExpression(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeThisReferenceExpression(),</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">AddRange</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeArgumentReferenceExpression(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">val</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cc1.Statements.Add(cc1_invoke);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;collectionClass.Members.Add(cc1);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CodeConstructor&nbsp;cc2</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">CreateConstructor(collectionClassName,</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;containing&nbsp;any&nbsp;array&nbsp;of&nbsp;&lt;see&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">itemClassName</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">'/&gt;&nbsp;objects</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">A&nbsp;array&nbsp;of&nbsp;&lt;see&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;itemClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">'/&gt;&nbsp;objects&nbsp;with&nbsp;which&nbsp;to&nbsp;intialize&nbsp;the&nbsp;collection</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cc2.Parameters.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeParameterDeclarationExpression(itemArrayReference,</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">val</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CodeMethodInvokeExpression&nbsp;cc2_invoke</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeMethodInvokeExpression(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeThisReferenceExpression(),</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">AddRange</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeArgumentReferenceExpression(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">val</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cc2.Statements.Add(cc2_invoke);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;collectionClass.Members.Add(cc2);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">#endregion</span></span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img id="Codehighlighter1_3968_5984_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top"><img id="Codehighlighter1_3968_5984_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_3968_5984_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">索引器</span><span id="Codehighlighter1_3968_5984_Open_Text" style="DISPLAY: none"><span style="COLOR: #0000ff">#region</span><span style="COLOR: #000000">&nbsp;索引器</span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CodeMemberProperty&nbsp;indexer&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeMemberProperty();<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indexer.Attributes&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">&nbsp;MemberAttributes.Final&nbsp;</span><span style="COLOR: #000000">|</span><span style="COLOR: #000000">&nbsp;MemberAttributes.Public;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indexer.Name&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Item</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indexer.Type&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeTypeReference(itemClassName);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indexer.Parameters.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeParameterDeclarationExpression(</span><span style="COLOR: #0000ff">typeof</span><span style="COLOR: #000000">&nbsp;(</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000">),&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">index</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indexer.HasGet&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indexer.HasSet&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indexer.GetStatements.Add(<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeMethodReturnStatement(<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCastExpression(<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;itemClassName,<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeIndexerExpression(<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodePropertyReferenceExpression(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeBaseReferenceExpression(),&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">List</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">),<br><img id="Codehighlighter1_4600_4645_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_4600_4645_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeExpression[]&nbsp;</span><span id="Codehighlighter1_4600_4645_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/dot.gif"></span><span id="Codehighlighter1_4600_4645_Open_Text"><span style="COLOR: #000000">{</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeArgumentReferenceExpression(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">index</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">)}</span></span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indexer.SetStatements.Add(<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeAssignStatement(<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeIndexerExpression(<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodePropertyReferenceExpression(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeBaseReferenceExpression(),&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">List</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">),<br><img id="Codehighlighter1_4882_4927_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_4882_4927_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeExpression[]&nbsp;</span><span id="Codehighlighter1_4882_4927_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/dot.gif"></span><span id="Codehighlighter1_4882_4927_Open_Text"><span style="COLOR: #000000">{</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeArgumentReferenceExpression(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">index</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">)}</span></span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;),<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeArgumentReferenceExpression(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">value</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">)<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indexer.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;summary&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indexer.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;para&gt;Represents&nbsp;the&nbsp;entry&nbsp;at&nbsp;the&nbsp;specified&nbsp;index&nbsp;of&nbsp;the&nbsp;&lt;see&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">itemClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">'/&gt;.&lt;/para&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indexer.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;/summary&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indexer.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;param&nbsp;name='index'&gt;&lt;para&gt;The&nbsp;zero-based&nbsp;index&nbsp;of&nbsp;the&nbsp;entry&nbsp;to&nbsp;locate&nbsp;in&nbsp;the&nbsp;collection.&lt;/para&gt;&lt;/param&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indexer.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;val&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indexer.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&lt;para&gt;&nbsp;The&nbsp;entry&nbsp;at&nbsp;the&nbsp;specified&nbsp;index&nbsp;of&nbsp;the&nbsp;collection.&lt;/para&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indexer.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;/val&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indexer.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;exception&nbsp;cref='System.ArgumentOutOfRangeException'&gt;&lt;paramref&nbsp;name='index'/&gt;&nbsp;is&nbsp;outside&nbsp;the&nbsp;valid&nbsp;range&nbsp;of&nbsp;indexes&nbsp;for&nbsp;the&nbsp;collection.&lt;/exception&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;collectionClass.Members.Add(indexer);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">#endregion</span></span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img id="Codehighlighter1_5990_7450_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top"><img id="Codehighlighter1_5990_7450_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_5990_7450_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">Add方法</span><span id="Codehighlighter1_5990_7450_Open_Text" style="DISPLAY: none"><span style="COLOR: #0000ff">#region</span><span style="COLOR: #000000">&nbsp;Add方法</span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CodeMemberMethod&nbsp;add</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeMemberMethod()&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;add.Attributes</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">MemberAttributes.Final&nbsp;</span><span style="COLOR: #000000">|</span><span style="COLOR: #000000">MemberAttributes.Public;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;add.ReturnType</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeTypeReference(</span><span style="COLOR: #0000ff">typeof</span><span style="COLOR: #000000">(</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000">))&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;add.Name</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Add</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;add.Parameters.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeParameterDeclarationExpression(itemClassName&nbsp;,</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">val</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">))&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;add.Statements.Add(<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeMethodReturnStatement(<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeMethodInvokeExpression(<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodePropertyReferenceExpression(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeBaseReferenceExpression(),</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">List</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">),</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Add</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeArgumentReferenceExpression(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">val</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">)<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)&nbsp;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)&nbsp;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;add.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;summary&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;add.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&lt;para&gt;Adds&nbsp;a&nbsp;&lt;see&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;itemClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">'/&gt;&nbsp;with&nbsp;the&nbsp;specified&nbsp;val&nbsp;to&nbsp;the</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;add.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&lt;see&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;collectionClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">'/&gt;&nbsp;.&lt;/para&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;add.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;/summary&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;add.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;param&nbsp;name='val'&gt;The&nbsp;&lt;see&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;itemClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">'/&gt;&nbsp;to&nbsp;add.&lt;/param&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;add.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;returns&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;add.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&lt;para&gt;The&nbsp;index&nbsp;at&nbsp;which&nbsp;the&nbsp;new&nbsp;element&nbsp;was&nbsp;inserted.&lt;/para&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;add.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;/returns&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;add.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;seealso&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;collectionClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">.AddRange'/&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;collectionClass.Members.Add(add);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">#endregion</span></span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img id="Codehighlighter1_7456_8947_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top"><img id="Codehighlighter1_7456_8947_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_7456_8947_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">AddRange方法</span><span id="Codehighlighter1_7456_8947_Open_Text" style="DISPLAY: none"><span style="COLOR: #0000ff">#region</span><span style="COLOR: #000000">&nbsp;AddRange方法</span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CodeMemberMethod&nbsp;addrange1</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeMemberMethod()&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addrange1.Attributes</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">MemberAttributes.Final&nbsp;</span><span style="COLOR: #000000">|</span><span style="COLOR: #000000">MemberAttributes.Public;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addrange1.Name</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">AddRange</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addrange1.Parameters.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeParameterDeclarationExpression(itemArrayReference,</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">val</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">))&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CodeIterationStatement&nbsp;forLoop&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;forLoop&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">&nbsp;CreateForLoop(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Length</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addrange1.Statements.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeVariableDeclarationStatement(</span><span style="COLOR: #0000ff">typeof</span><span style="COLOR: #000000">(</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000">),</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">i</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">)&nbsp;)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addrange1.Statements.Add(forLoop);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addrange1.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;summary&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addrange1.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;para&gt;Copies&nbsp;the&nbsp;elements&nbsp;of&nbsp;an&nbsp;array&nbsp;to&nbsp;the&nbsp;end&nbsp;of&nbsp;the&nbsp;&lt;see&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;collectionClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">'/&gt;.&lt;/para&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addrange1.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;/summary&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addrange1.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;param&nbsp;name='val'&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addrange1.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;An&nbsp;array&nbsp;of&nbsp;type&nbsp;&lt;see&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;itemClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">'/&gt;&nbsp;containing&nbsp;the&nbsp;objects&nbsp;to&nbsp;add&nbsp;to&nbsp;the&nbsp;collection.</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addrange1.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;/param&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addrange1.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;returns&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addrange1.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;&nbsp;&lt;para&gt;None.&lt;/para&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addrange1.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;/returns&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addrange1.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;seealso&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;collectionClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">.Add'/&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;collectionClass.Members.Add(addrange1);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">#endregion</span></span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img id="Codehighlighter1_8953_10541_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top"><img id="Codehighlighter1_8953_10541_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_8953_10541_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">AddRange方法</span><span id="Codehighlighter1_8953_10541_Open_Text" style="DISPLAY: none"><span style="COLOR: #0000ff">#region</span><span style="COLOR: #000000">&nbsp;AddRange方法</span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CodeMemberMethod&nbsp;addrange2</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeMemberMethod()&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addrange2.Attributes</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">MemberAttributes.Final&nbsp;</span><span style="COLOR: #000000">|</span><span style="COLOR: #000000">MemberAttributes.Public;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addrange2.Name</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">AddRange</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addrange2.Parameters.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeParameterDeclarationExpression(collectionClassName,</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">val</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">))&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addrange2.Statements.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeVariableDeclarationStatement(</span><span style="COLOR: #0000ff">typeof</span><span style="COLOR: #000000">(</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000">),</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">i</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">)&nbsp;)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;forLoop</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">CreateForLoop(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Count</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addrange2.Statements.Add(forLoop);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addrange2.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;summary&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addrange2.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&lt;para&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addrange2.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds&nbsp;the&nbsp;contents&nbsp;of&nbsp;another&nbsp;&lt;see&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;collectionClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">'/&gt;&nbsp;to&nbsp;the&nbsp;end&nbsp;of&nbsp;the&nbsp;collection.</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addrange2.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&lt;/para&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addrange2.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;/summary&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addrange2.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;param&nbsp;name='val'&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addrange2.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;A&nbsp;&lt;see&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;collectionClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">'/&gt;&nbsp;containing&nbsp;the&nbsp;objects&nbsp;to&nbsp;add&nbsp;to&nbsp;the&nbsp;collection.</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addrange2.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;/param&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addrange2.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;returns&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addrange2.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;&nbsp;&lt;para&gt;None.&lt;/para&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addrange2.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;/returns&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addrange2.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;seealso&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;collectionClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">.Add'/&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;collectionClass.Members.Add(addrange2);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">#endregion</span></span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img id="Codehighlighter1_10547_12234_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top"><img id="Codehighlighter1_10547_12234_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_10547_12234_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">Contains方法</span><span id="Codehighlighter1_10547_12234_Open_Text" style="DISPLAY: none"><span style="COLOR: #0000ff">#region</span><span style="COLOR: #000000">&nbsp;Contains方法</span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CodeMemberMethod&nbsp;contains</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeMemberMethod()&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;contains.Name&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Contains</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;contains.ReturnType</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeTypeReference(</span><span style="COLOR: #0000ff">typeof</span><span style="COLOR: #000000">(</span><span style="COLOR: #0000ff">bool</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;contains.Attributes</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">MemberAttributes.Final</span><span style="COLOR: #000000">|</span><span style="COLOR: #000000">&nbsp;MemberAttributes.Public;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;contains.Parameters.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeParameterDeclarationExpression(itemClassName,</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">val</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;contains.Statements.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeMethodReturnStatement(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeMethodInvokeExpression(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodePropertyReferenceExpression(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeBaseReferenceExpression(),</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">List</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">),</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Contains</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeArgumentReferenceExpression(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">val</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">))));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;contains.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;summary&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)&nbsp;);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;contains.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;para&gt;Gets&nbsp;a&nbsp;val&nbsp;indicating&nbsp;whether&nbsp;the</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)&nbsp;);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;contains.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&lt;see&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;collectionClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">'/&gt;&nbsp;contains&nbsp;the&nbsp;specified&nbsp;&lt;see&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;itemClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">'/&gt;.&lt;/para&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)&nbsp;);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;contains.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;/summary&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)&nbsp;);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;contains.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;param&nbsp;name='val'&gt;The&nbsp;&lt;see&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;itemClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">'/&gt;&nbsp;to&nbsp;locate.&lt;/param&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)&nbsp;);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;contains.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;returns&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)&nbsp;);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;contains.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;para&gt;&lt;see&nbsp;langword='true'/&gt;&nbsp;if&nbsp;the&nbsp;&lt;see&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;itemClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">'/&gt;&nbsp;is&nbsp;contained&nbsp;in&nbsp;the&nbsp;collection;&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)&nbsp;);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;contains.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;&nbsp;otherwise,&nbsp;&lt;see&nbsp;langword='false'/&gt;.&lt;/para&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)&nbsp;);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;contains.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;/returns&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)&nbsp;);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;contains.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;seealso&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;collectionClassName</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">.IndexOf'/&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)&nbsp;);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;collectionClass.Members.Add(contains);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">#endregion</span></span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img id="Codehighlighter1_12240_14771_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top"><img id="Codehighlighter1_12240_14771_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_12240_14771_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">CopyTo方法</span><span id="Codehighlighter1_12240_14771_Open_Text" style="DISPLAY: none"><span style="COLOR: #0000ff">#region</span><span style="COLOR: #000000">&nbsp;CopyTo方法</span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CodeMemberMethod&nbsp;copyto</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeMemberMethod()&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;copyto.Name</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">CopyTo</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;copyto.Attributes</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">MemberAttributes.Final&nbsp;</span><span style="COLOR: #000000">|</span><span style="COLOR: #000000">&nbsp;MemberAttributes.Public;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;copyto.Parameters.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeParameterDeclarationExpression(itemArrayReference,</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">array</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">))&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;copyto.Parameters.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeParameterDeclarationExpression(</span><span style="COLOR: #0000ff">typeof</span><span style="COLOR: #000000">(</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000">),</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">index</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">)&nbsp;)&nbsp;;<br><img id="Codehighlighter1_12754_12845_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_12754_12845_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;copyto.Statements.Add((</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeMethodInvokeExpression(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodePropertyReferenceExpression(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeBaseReferenceExpression(),</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">List</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">),</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">CopyTo</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeExpression[]</span><span id="Codehighlighter1_12754_12845_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/dot.gif"></span><span id="Codehighlighter1_12754_12845_Open_Text"><span style="COLOR: #000000">{</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeArgumentReferenceExpression(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">array</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">),</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeArgumentReferenceExpression(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">index</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">)&nbsp;}</span></span><span style="COLOR: #000000">)&nbsp;)&nbsp;)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;copyto.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;summary&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;copyto.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;para&gt;Copies&nbsp;the&nbsp;&lt;see&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;collectionClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">'/&gt;&nbsp;values&nbsp;to&nbsp;a&nbsp;one-dimensional&nbsp;&lt;see&nbsp;cref='System.Array'/&gt;&nbsp;instance&nbsp;at&nbsp;the&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;copyto.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;specified&nbsp;index.&lt;/para&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;copyto.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;/summary&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;copyto.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;param&nbsp;name='array'&gt;&lt;para&gt;The&nbsp;one-dimensional&nbsp;&lt;see&nbsp;cref='System.Array'/&gt;&nbsp;that&nbsp;is&nbsp;the&nbsp;destination&nbsp;of&nbsp;the&nbsp;values&nbsp;copied&nbsp;from&nbsp;&lt;see&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;collectionClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">'/&gt;&nbsp;.&lt;/para&gt;&lt;/param&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;copyto.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;param&nbsp;name='index'&gt;The&nbsp;index&nbsp;in&nbsp;&lt;paramref&nbsp;name='array'/&gt;&nbsp;where&nbsp;copying&nbsp;begins.&lt;/param&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;copyto.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;returns&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;copyto.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;&nbsp;&lt;para&gt;None.&lt;/para&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;copyto.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;/returns&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;copyto.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;exception&nbsp;cref='System.ArgumentException'&gt;&lt;para&gt;&lt;paramref&nbsp;name='array'/&gt;&nbsp;is&nbsp;multidimensional.&lt;/para&gt;&nbsp;&lt;para&gt;-or-&lt;/para&gt;&nbsp;&lt;para&gt;The&nbsp;number&nbsp;of&nbsp;elements&nbsp;in&nbsp;the&nbsp;&lt;see&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;collectionClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">'/&gt;&nbsp;is&nbsp;greater&nbsp;than&nbsp;the&nbsp;available&nbsp;space&nbsp;between&nbsp;&lt;paramref&nbsp;name='arrayIndex'/&gt;&nbsp;and&nbsp;the&nbsp;end&nbsp;of&nbsp;&lt;paramref&nbsp;name='array'/&gt;.&lt;/para&gt;&lt;/exception&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;copyto.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;exception&nbsp;cref='System.ArgumentNullException'&gt;&lt;paramref&nbsp;name='array'/&gt;&nbsp;is&nbsp;&lt;see&nbsp;langword='null'/&gt;.&nbsp;&lt;/exception&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;copyto.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;exception&nbsp;cref='System.ArgumentOutOfRangeException'&gt;&lt;paramref&nbsp;name='arrayIndex'/&gt;&nbsp;is&nbsp;less&nbsp;than&nbsp;&lt;paramref&nbsp;name='array'/&gt;'s&nbsp;lowbound.&nbsp;&lt;/exception&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;copyto.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;seealso&nbsp;cref='System.Array'/&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;collectionClass.Members.Add(copyto);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">#endregion</span></span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img id="Codehighlighter1_14777_16441_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top"><img id="Codehighlighter1_14777_16441_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_14777_16441_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">IndexOf方法</span><span id="Codehighlighter1_14777_16441_Open_Text" style="DISPLAY: none"><span style="COLOR: #0000ff">#region</span><span style="COLOR: #000000">&nbsp;IndexOf方法</span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CodeMemberMethod&nbsp;indexof</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeMemberMethod()&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indexof.Name&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">IndexOf</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indexof.Attributes</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">MemberAttributes.Final</span><span style="COLOR: #000000">|</span><span style="COLOR: #000000">&nbsp;MemberAttributes.Public;&nbsp;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indexof.ReturnType&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeTypeReference(</span><span style="COLOR: #0000ff">typeof</span><span style="COLOR: #000000">(</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000">))&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indexof.Parameters.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeParameterDeclarationExpression(itemClassName,</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">val</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">)&nbsp;)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indexof.Statements.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeMethodReturnStatement(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeMethodInvokeExpression(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodePropertyReferenceExpression(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeBaseReferenceExpression(),</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">List</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">),</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">IndexOf</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeArgumentReferenceExpression(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">val</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">))&nbsp;)&nbsp;);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indexof.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;summary&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indexof.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&lt;para&gt;Returns&nbsp;the&nbsp;index&nbsp;of&nbsp;a&nbsp;&lt;see&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">itemClassName</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">'/&gt;&nbsp;in&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indexof.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;&lt;see&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;collectionClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">'/&gt;&nbsp;.&lt;/para&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indexof.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;/summary&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indexof.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;param&nbsp;name='val'&gt;The&nbsp;&lt;see&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;itemClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">'/&gt;&nbsp;to&nbsp;locate.&lt;/param&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indexof.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;returns&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indexof.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;para&gt;The&nbsp;index&nbsp;of&nbsp;the&nbsp;&lt;see&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;itemClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">'/&gt;&nbsp;of&nbsp;&lt;paramref&nbsp;name='val'/&gt;&nbsp;in&nbsp;the&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indexof.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;see&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;collectionClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">'/&gt;,&nbsp;if&nbsp;found;&nbsp;otherwise,&nbsp;-1.&lt;/para&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indexof.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;/returns&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indexof.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;seealso&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;collectionClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">.Contains'/&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;collectionClass.Members.Add(indexof)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">#endregion</span></span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img id="Codehighlighter1_16447_17928_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top"><img id="Codehighlighter1_16447_17928_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_16447_17928_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">Insert方法</span><span id="Codehighlighter1_16447_17928_Open_Text" style="DISPLAY: none"><span style="COLOR: #0000ff">#region</span><span style="COLOR: #000000">&nbsp;Insert方法</span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CodeMemberMethod&nbsp;insert</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeMemberMethod()&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;insert.Name&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Insert</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;insert.Attributes&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">MemberAttributes.Final</span><span style="COLOR: #000000">|</span><span style="COLOR: #000000">&nbsp;MemberAttributes.Public;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;insert.Parameters.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeParameterDeclarationExpression(</span><span style="COLOR: #0000ff">typeof</span><span style="COLOR: #000000">(</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000">),</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">index</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">)&nbsp;);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;insert.Parameters.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeParameterDeclarationExpression(itemClassName,</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">val</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">)&nbsp;)&nbsp;;<br><img id="Codehighlighter1_16954_17042_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_16954_17042_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;insert.Statements.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeMethodInvokeExpression(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodePropertyReferenceExpression(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeBaseReferenceExpression(),</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">List</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">),</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Insert</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeExpression[]</span><span id="Codehighlighter1_16954_17042_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/dot.gif"></span><span id="Codehighlighter1_16954_17042_Open_Text"><span style="COLOR: #000000">{</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeArgumentReferenceExpression(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">index</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">),</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeArgumentReferenceExpression(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">val</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">)}</span></span><span style="COLOR: #000000">&nbsp;)&nbsp;);&nbsp;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;insert.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;summary&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;insert.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;para&gt;Inserts&nbsp;a&nbsp;&lt;see&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;itemClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">'/&gt;&nbsp;into&nbsp;the&nbsp;&lt;see&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;collectionClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">'/&gt;&nbsp;at&nbsp;the&nbsp;specified&nbsp;index.&lt;/para&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;insert.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;/summary&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;insert.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;param&nbsp;name='index'&gt;The&nbsp;zero-based&nbsp;index&nbsp;where&nbsp;&lt;paramref&nbsp;name='val'/&gt;&nbsp;should&nbsp;be&nbsp;inserted.&lt;/param&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;insert.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;param&nbsp;name='&nbsp;val'&gt;The&nbsp;&lt;see&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;itemClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">'/&gt;&nbsp;to&nbsp;insert.&lt;/param&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;insert.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;returns&gt;&lt;para&gt;None.&lt;/para&gt;&lt;/returns&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;insert.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;seealso&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;collectionClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">.Add'/&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;collectionClass.Members.Add(insert);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">#endregion</span></span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img id="Codehighlighter1_17934_19117_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top"><img id="Codehighlighter1_17934_19117_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_17934_19117_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">GetEnumerator方法</span><span id="Codehighlighter1_17934_19117_Open_Text" style="DISPLAY: none"><span style="COLOR: #0000ff">#region</span><span style="COLOR: #000000">&nbsp;GetEnumerator方法</span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CodeMemberMethod&nbsp;getenumerator</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeMemberMethod()&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;getenumerator.Name&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">GetEnumerator</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;getenumerator.Attributes&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">MemberAttributes.New&nbsp;</span><span style="COLOR: #000000">|</span><span style="COLOR: #000000">&nbsp;MemberAttributes.Public&nbsp;</span><span style="COLOR: #000000">|</span><span style="COLOR: #000000">&nbsp;MemberAttributes.Final;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;getenumerator.ReturnType&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeTypeReference(itemClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Enumerator</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">)&nbsp;;<br><img id="Codehighlighter1_18385_18419_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_18385_18419_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;getenumerator.Statements.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeMethodReturnStatement(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeObjectCreateExpression(itemClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Enumerator</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeExpression[]</span><span id="Codehighlighter1_18385_18419_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/dot.gif"></span><span id="Codehighlighter1_18385_18419_Open_Text"><span style="COLOR: #000000">{</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeThisReferenceExpression()}</span></span><span style="COLOR: #000000">&nbsp;)&nbsp;)&nbsp;);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;getenumerator.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;summary&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)&nbsp;)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;getenumerator.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&lt;para&gt;Returns&nbsp;an&nbsp;enumerator&nbsp;that&nbsp;can&nbsp;iterate&nbsp;through&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)&nbsp;)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;getenumerator.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;&lt;see&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;&nbsp;collectionClassName</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">'/&gt;&nbsp;.&lt;/para&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)&nbsp;)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;getenumerator.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;/summary&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)&nbsp;)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;getenumerator.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;returns&gt;&lt;para&gt;None.&lt;/para&gt;&lt;/returns&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)&nbsp;)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;getenumerator.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;seealso&nbsp;cref='System.Collections.IEnumerator'/&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)&nbsp;)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;collectionClass.Members.Add(getenumerator)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">#endregion</span></span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img id="Codehighlighter1_19123_20492_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top"><img id="Codehighlighter1_19123_20492_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_19123_20492_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">Remove方法</span><span id="Codehighlighter1_19123_20492_Open_Text" style="DISPLAY: none"><span style="COLOR: #0000ff">#region</span><span style="COLOR: #000000">&nbsp;Remove方法</span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CodeMemberMethod&nbsp;remove&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeMemberMethod()&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;remove.Name&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Remove</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;remove.Attributes&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">MemberAttributes.Final</span><span style="COLOR: #000000">|</span><span style="COLOR: #000000">&nbsp;MemberAttributes.Public;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;remove.Parameters.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeParameterDeclarationExpression(itemClassName,</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">val</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">)&nbsp;)&nbsp;;<br><img id="Codehighlighter1_19544_19588_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_19544_19588_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;remove.Statements.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeMethodInvokeExpression(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodePropertyReferenceExpression(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeBaseReferenceExpression(),</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">List</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">)&nbsp;,</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Remove</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeExpression[]</span><span id="Codehighlighter1_19544_19588_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/dot.gif"></span><span id="Codehighlighter1_19544_19588_Open_Text"><span style="COLOR: #000000">{</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeArgumentReferenceExpression(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">val</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">)&nbsp;}</span></span><span style="COLOR: #000000">&nbsp;)&nbsp;)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;remove.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;summary&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)&nbsp;)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;remove.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&lt;para&gt;&nbsp;Removes&nbsp;a&nbsp;specific&nbsp;&lt;see&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;itemClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">'/&gt;&nbsp;from&nbsp;the&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)&nbsp;)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;remove.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&lt;see&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;collectionClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">'/&gt;&nbsp;.&lt;/para&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)&nbsp;)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;remove.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;/summary&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)&nbsp;)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;remove.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;param&nbsp;name='val'&gt;The&nbsp;&lt;see&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">itemClassName</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">'/&gt;&nbsp;to&nbsp;remove&nbsp;from&nbsp;the&nbsp;&lt;see&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;collectionClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">'/&gt;&nbsp;.&lt;/param&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)&nbsp;)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;remove.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;returns&gt;&lt;para&gt;None.&lt;/para&gt;&lt;/returns&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)&nbsp;)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;remove.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;exception&nbsp;cref='System.ArgumentException'&gt;&lt;paramref&nbsp;name='val'/&gt;&nbsp;is&nbsp;not&nbsp;found&nbsp;in&nbsp;the&nbsp;Collection.&nbsp;&lt;/exception&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)&nbsp;)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;collectionClass.Members.Add(remove);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">#endregion</span></span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;collectionClass.Members.Add(GetEnumerator(itemClassName,collectionClassName));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">#endregion</span></span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000">&nbsp;CompileUnit;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">private</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">static</span><span style="COLOR: #000000">&nbsp;CodeTypeDeclaration&nbsp;GetEnumerator(</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">&nbsp;itemClassName,</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">&nbsp;collectionClassName)<br><img id="Codehighlighter1_20724_26633_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_20724_26633_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_20724_26633_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/dot.gif"></span><span id="Codehighlighter1_20724_26633_Open_Text"><span style="COLOR: #000000">{<br><img id="Codehighlighter1_20729_21192_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top"><img id="Codehighlighter1_20729_21192_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_20729_21192_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">枚举器类</span><span id="Codehighlighter1_20729_21192_Open_Text" style="DISPLAY: none"><span style="COLOR: #0000ff">#region</span><span style="COLOR: #000000">&nbsp;枚举器类</span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CodeTypeDeclaration&nbsp;enumeratorClass&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeTypeDeclaration(itemClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Enumerator</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enumeratorClass.BaseTypes.Add(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">IEnumerator</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enumeratorClass.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;summary&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)&nbsp;)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enumeratorClass.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;&nbsp;Enumerator&nbsp;of&nbsp;&nbsp;the&nbsp;&lt;see&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">collectionClassName</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">'/&gt;.</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)&nbsp;)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enumeratorClass.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;/summary&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)&nbsp;)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">#endregion</span></span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img id="Codehighlighter1_21198_21469_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top"><img id="Codehighlighter1_21198_21469_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_21198_21469_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">私有变量</span><span id="Codehighlighter1_21198_21469_Open_Text" style="DISPLAY: none"><span style="COLOR: #0000ff">#region</span><span style="COLOR: #000000">&nbsp;私有变量</span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CodeMemberField&nbsp;baseEnumerator</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeMemberField(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">IEnumerator</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">baseEnumerator</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CodeMemberField&nbsp;temp</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeMemberField(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">IEnumerable</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">temp</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enumeratorClass.Members.Add(baseEnumerator)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enumeratorClass.Members.Add(temp)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">#endregion</span></span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img id="Codehighlighter1_21475_22734_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top"><img id="Codehighlighter1_21475_22734_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_21475_22734_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">构造函数</span><span id="Codehighlighter1_21475_22734_Open_Text" style="DISPLAY: none"><span style="COLOR: #0000ff">#region</span><span style="COLOR: #000000">&nbsp;构造函数</span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CodeConstructor&nbsp;constructor</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeConstructor()&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;constructor.Attributes&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">MemberAttributes.Public;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;constructor.Parameters.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeParameterDeclarationExpression(collectionClassName,</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">mappings</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;)&nbsp;)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;constructor.Statements.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeAssignStatement(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodePropertyReferenceExpression(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeThisReferenceExpression(),</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">temp</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">),</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCastExpression(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">IEnumerable</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeArgumentReferenceExpression(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">mappings</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">)))&nbsp;)&nbsp;;<br><img id="Codehighlighter1_22209_22210_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_22209_22210_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;constructor.Statements.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeAssignStatement(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodePropertyReferenceExpression(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeThisReferenceExpression(),</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">baseEnumerator</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">),</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeMethodInvokeExpression(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeFieldReferenceExpression(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeThisReferenceExpression(),</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">temp</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">),</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">GetEnumerator</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeExpression[]</span><span id="Codehighlighter1_22209_22210_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/dot.gif"></span><span id="Codehighlighter1_22209_22210_Open_Text"><span style="COLOR: #000000">{}</span></span><span style="COLOR: #000000">&nbsp;)&nbsp;)&nbsp;)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;constructor.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;summary&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)&nbsp;)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;constructor.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">The&nbsp;Constructor&nbsp;of</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;enumeratorClass.Name,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)&nbsp;)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;constructor.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;/summary&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)&nbsp;)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;constructor.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;param&nbsp;name='mappings'&gt;&nbsp;&nbsp;The&nbsp;&lt;see&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;collectionClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">'/&gt;&nbsp;containing&nbsp;the&nbsp;objects&nbsp;to&nbsp;initialize&nbsp;the&nbsp;collection.&lt;/param&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)&nbsp;)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enumeratorClass.Members.Add(constructor)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">#endregion</span></span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img id="Codehighlighter1_22740_23568_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top"><img id="Codehighlighter1_22740_23568_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_22740_23568_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">Current属性</span><span id="Codehighlighter1_22740_23568_Open_Text" style="DISPLAY: none"><span style="COLOR: #0000ff">#region</span><span style="COLOR: #000000">&nbsp;Current属性</span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CodeMemberProperty&nbsp;current</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeMemberProperty()&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;current.Type&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeTypeReference(itemClassName)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;current.Name&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Current</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;current.HasGet&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;current.HasSet</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">false</span><span style="COLOR: #000000">;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;current.Attributes&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">MemberAttributes.Public&nbsp;&nbsp;</span><span style="COLOR: #000000">|</span><span style="COLOR: #000000">&nbsp;MemberAttributes.Final;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;current.GetStatements.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeMethodReturnStatement(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCastExpression(itemClassName,</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodePropertyReferenceExpression(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeFieldReferenceExpression(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeThisReferenceExpression(),</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">baseEnumerator</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">),</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Current</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">)&nbsp;)&nbsp;)&nbsp;);&nbsp;&nbsp;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;current.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;summary&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)&nbsp;)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;current.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Get&nbsp;current&nbsp;&lt;see&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;itemClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">'/&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)&nbsp;)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;current.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;/summary&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)&nbsp;)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enumeratorClass.Members.Add(current);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">#endregion</span></span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img id="Codehighlighter1_23574_24118_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top"><img id="Codehighlighter1_23574_24118_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_23574_24118_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">实现IEnumerator的Current属性</span><span id="Codehighlighter1_23574_24118_Open_Text" style="DISPLAY: none"><span style="COLOR: #0000ff">#region</span><span style="COLOR: #000000">&nbsp;实现IEnumerator的Current属性</span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CodeMemberProperty&nbsp;iCurrent</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeMemberProperty()&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iCurrent.Name&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">IEnumerator.Current</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iCurrent.Type&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeTypeReference(</span><span style="COLOR: #0000ff">typeof</span><span style="COLOR: #000000">(</span><span style="COLOR: #0000ff">object</span><span style="COLOR: #000000">))&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iCurrent.Attributes</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">MemberAttributes.Final;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iCurrent.HasGet&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iCurrent.HasSet</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">false</span><span style="COLOR: #000000">;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iCurrent.GetStatements.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeMethodReturnStatement(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodePropertyReferenceExpression(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeFieldReferenceExpression(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeThisReferenceExpression(),</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">baseEnumerator</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">)&nbsp;,</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Current</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">)&nbsp;)&nbsp;)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enumeratorClass.Members.Add(iCurrent)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">#endregion</span></span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img id="Codehighlighter1_24124_25034_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top"><img id="Codehighlighter1_24124_25034_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_24124_25034_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">MoveNext方法</span><span id="Codehighlighter1_24124_25034_Open_Text" style="DISPLAY: none"><span style="COLOR: #0000ff">#region</span><span style="COLOR: #000000">&nbsp;MoveNext方法</span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CodeMemberMethod&nbsp;movenext</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeMemberMethod()&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movenext.Name&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">MoveNext</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movenext.ReturnType&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeTypeReference(</span><span style="COLOR: #0000ff">typeof</span><span style="COLOR: #000000">(</span><span style="COLOR: #0000ff">bool</span><span style="COLOR: #000000">))&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movenext.Attributes&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">MemberAttributes.Final&nbsp;</span><span style="COLOR: #000000">|</span><span style="COLOR: #000000">&nbsp;MemberAttributes.Public&nbsp;;<br><img id="Codehighlighter1_24569_24570_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_24569_24570_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movenext.Statements.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeMethodReturnStatement(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeMethodInvokeExpression(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeFieldReferenceExpression(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeThisReferenceExpression(),</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">baseEnumerator</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">),</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">MoveNext</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeExpression[]</span><span id="Codehighlighter1_24569_24570_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/dot.gif"></span><span id="Codehighlighter1_24569_24570_Open_Text"><span style="COLOR: #000000">{}</span></span><span style="COLOR: #000000">&nbsp;)&nbsp;));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movenext.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;summary&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)&nbsp;)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movenext.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;Set&nbsp;the&nbsp;current&nbsp;&lt;see&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;itemClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">'/&gt;&nbsp;to&nbsp;the&nbsp;next.</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)&nbsp;)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movenext.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;/summary&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)&nbsp;)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movenext.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;returns&gt;&nbsp;If&nbsp;operate&nbsp;success&nbsp;return&nbsp;True&nbsp;else&nbsp;Flase.&lt;/returns&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)&nbsp;)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enumeratorClass.Members.Add(movenext)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">#endregion</span></span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img id="Codehighlighter1_25040_25556_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top"><img id="Codehighlighter1_25040_25556_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_25040_25556_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">实现IEnumerator的MoveNext方法</span><span id="Codehighlighter1_25040_25556_Open_Text" style="DISPLAY: none"><span style="COLOR: #0000ff">#region</span><span style="COLOR: #000000">&nbsp;实现IEnumerator的MoveNext方法</span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CodeMemberMethod&nbsp;iMoveNext</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeMemberMethod()&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iMoveNext.Name&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">IEnumerator.MoveNext</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;&nbsp;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iMoveNext.ReturnType&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeTypeReference(</span><span style="COLOR: #0000ff">typeof</span><span style="COLOR: #000000">(</span><span style="COLOR: #0000ff">bool</span><span style="COLOR: #000000">))&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iMoveNext.Attributes&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">MemberAttributes.Final;<br><img id="Codehighlighter1_25490_25491_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_25490_25491_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iMoveNext.Statements.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeMethodReturnStatement(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeMethodInvokeExpression(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeFieldReferenceExpression(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeThisReferenceExpression(),</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">baseEnumerator</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">),</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">MoveNext</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeExpression[]</span><span id="Codehighlighter1_25490_25491_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/dot.gif"></span><span id="Codehighlighter1_25490_25491_Open_Text"><span style="COLOR: #000000">{}</span></span><span style="COLOR: #000000">&nbsp;)&nbsp;));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enumeratorClass.Members.Add(iMoveNext)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">#endregion</span></span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img id="Codehighlighter1_25562_26198_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top"><img id="Codehighlighter1_25562_26198_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_25562_26198_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">Reset方法</span><span id="Codehighlighter1_25562_26198_Open_Text" style="DISPLAY: none"><span style="COLOR: #0000ff">#region</span><span style="COLOR: #000000">&nbsp;Reset方法</span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CodeMemberMethod&nbsp;reset</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeMemberMethod()&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;reset.Name&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Reset</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;reset.Attributes&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">MemberAttributes.Final&nbsp;</span><span style="COLOR: #000000">|</span><span style="COLOR: #000000">&nbsp;MemberAttributes.Public&nbsp;;<br><img id="Codehighlighter1_25894_25895_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_25894_25895_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;reset.Statements.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeMethodInvokeExpression(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeFieldReferenceExpression(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeThisReferenceExpression(),</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">baseEnumerator</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">),</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Reset</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeExpression[]</span><span id="Codehighlighter1_25894_25895_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/dot.gif"></span><span id="Codehighlighter1_25894_25895_Open_Text"><span style="COLOR: #000000">{}</span></span><span style="COLOR: #000000">&nbsp;)&nbsp;)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;reset.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;summary&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)&nbsp;)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;reset.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;Reset&nbsp;current&nbsp;point&nbsp;of&nbsp;the&nbsp;IEnumerator.</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)&nbsp;)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;reset.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;/summary&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)&nbsp;)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enumeratorClass.Members.Add(reset)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">#endregion</span></span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img id="Codehighlighter1_26204_26601_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top"><img id="Codehighlighter1_26204_26601_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_26204_26601_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">实现IEnumerator的Reset方法</span><span id="Codehighlighter1_26204_26601_Open_Text" style="DISPLAY: none"><span style="COLOR: #0000ff">#region</span><span style="COLOR: #000000">&nbsp;实现IEnumerator的Reset方法</span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CodeMemberMethod&nbsp;iReset</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeMemberMethod()&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iReset.Name&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">IEnumerator.Reset</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iReset.Attributes&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">MemberAttributes.Final;<br><img id="Codehighlighter1_26539_26540_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_26539_26540_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iReset.Statements.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeMethodInvokeExpression(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeFieldReferenceExpression(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeThisReferenceExpression(),</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">baseEnumerator</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">),</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Reset</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeExpression[]</span><span id="Codehighlighter1_26539_26540_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/dot.gif"></span><span id="Codehighlighter1_26539_26540_Open_Text"><span style="COLOR: #000000">{}</span></span><span style="COLOR: #000000">&nbsp;)&nbsp;)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enumeratorClass.Members.Add(iReset)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">#endregion</span></span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000">&nbsp;enumeratorClass;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">private</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">static</span><span style="COLOR: #000000">&nbsp;CodeIterationStatement&nbsp;CreateForLoop(</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">&nbsp;valPropertyName)<br><img id="Codehighlighter1_26717_27630_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_26717_27630_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_26717_27630_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/dot.gif"></span><span id="Codehighlighter1_26717_27630_Open_Text"><span style="COLOR: #000000">{<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CodeIterationStatement&nbsp;forLoop;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;forLoop</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeIterationStatement(<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeAssignStatement(&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeVariableReferenceExpression(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">i</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">),&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodePrimitiveExpression(</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">)&nbsp;),<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeBinaryOperatorExpression(&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeVariableReferenceExpression(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">i</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">),&nbsp;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CodeBinaryOperatorType.LessThan,&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodePropertyReferenceExpression(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeArgumentReferenceExpression(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">val</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">),valPropertyName)),<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeAssignStatement(&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeVariableReferenceExpression(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">i</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">),&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeBinaryOperatorExpression(&nbsp;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeVariableReferenceExpression(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">i</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">),&nbsp;CodeBinaryOperatorType.Add,&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodePrimitiveExpression(</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">)&nbsp;)),<br><img id="Codehighlighter1_27388_27605_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_27388_27605_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeStatement[]</span><span id="Codehighlighter1_27388_27605_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/dot.gif"></span><span id="Codehighlighter1_27388_27605_Open_Text"><span style="COLOR: #000000">{&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeExpressionStatement(&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeMethodInvokeExpression(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeThisReferenceExpression(),</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Add</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeIndexerExpression(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeArgumentReferenceExpression(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">val</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">),</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeVariableReferenceExpression(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">i</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">))&nbsp;)&nbsp;)&nbsp;}</span></span><span style="COLOR: #000000">);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000">&nbsp;forLoop;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">private</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">static</span><span style="COLOR: #000000">&nbsp;CodeConstructor&nbsp;CreateConstructor(</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">&nbsp;collectionClassName,&nbsp;</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">&nbsp;paraEnd,</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">&nbsp;paramInfo)<br><img id="Codehighlighter1_27747_28509_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_27747_28509_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_27747_28509_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/dot.gif"></span><span id="Codehighlighter1_27747_28509_Open_Text"><span style="COLOR: #000000">{<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CodeConstructor&nbsp;cc&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeConstructor()&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cc.Attributes&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">MemberAttributes.Public&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cc.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;summary&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cc.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&lt;para&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cc.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Initializes&nbsp;a&nbsp;new&nbsp;instance&nbsp;of&nbsp;&lt;see&nbsp;cref='</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;collectionClassName&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">'/&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;paraEnd&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">.</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cc.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&lt;/para&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cc.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;/summary&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000">(paramInfo.Length</span><span style="COLOR: #000000">&gt;</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">)<br><img id="Codehighlighter1_28276_28491_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_28276_28491_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_28276_28491_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/dot.gif"></span><span id="Codehighlighter1_28276_28491_Open_Text"><span style="COLOR: #000000">{<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cc.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;param&nbsp;name='val'&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cc.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">paramInfo,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cc.Comments.Add(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeCommentStatement(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;/param&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">));<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000">&nbsp;cc;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img id="Codehighlighter1_28515_28810_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_28515_28810_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_28515_28810_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</span><span id="Codehighlighter1_28515_28810_Open_Text"><span style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;</span><span style="COLOR: #808080">&lt;summary&gt;</span><span style="COLOR: #008000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;生成指定的类型的强类型集合<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;</span><span style="COLOR: #808080">&lt;/summary&gt;</span><span style="COLOR: #008000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;</span><span style="COLOR: #808080">&lt;param&nbsp;name="itemTypeName"&gt;</span><span style="COLOR: #008000">集合中的元素的类型</span><span style="COLOR: #808080">&lt;/param&gt;</span><span style="COLOR: #008000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;</span><span style="COLOR: #808080">&lt;param&nbsp;name="nameSpace"&gt;</span><span style="COLOR: #008000">代码所在的命名空间</span><span style="COLOR: #808080">&lt;/param&gt;</span><span style="COLOR: #008000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;</span><span style="COLOR: #808080">&lt;param&nbsp;name="collectionClassName"&gt;</span><span style="COLOR: #008000">集合类的名称</span><span style="COLOR: #808080">&lt;/param&gt;</span><span style="COLOR: #008000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;</span><span style="COLOR: #808080">&lt;param&nbsp;name="codeType"&gt;</span><span style="COLOR: #008000">代码的类型</span><span style="COLOR: #808080">&lt;/param&gt;</span><span style="COLOR: #008000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;</span><span style="COLOR: #808080">&lt;param&nbsp;name="textWriter"&gt;</span><span style="COLOR: #008000">指定的文本编写器</span><span style="COLOR: #808080">&lt;/param&gt;</span><span style="COLOR: #808080"></span></span><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">static</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000">&nbsp;Make(</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">&nbsp;itemTypeName,</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">&nbsp;nameSpace,</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">&nbsp;collectionClassName,CodeType&nbsp;codeType,TextWriter&nbsp;textWriter)<br><img id="Codehighlighter1_28944_29680_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_28944_29680_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_28944_29680_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/dot.gif"></span><span id="Codehighlighter1_28944_29680_Open_Text"><span style="COLOR: #000000">{<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CodeDomProvider&nbsp;provider;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">switch</span><span style="COLOR: #000000">(codeType)<br><img id="Codehighlighter1_28998_29296_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_28998_29296_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_28998_29296_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/dot.gif"></span><span id="Codehighlighter1_28998_29296_Open_Text"><span style="COLOR: #000000">{<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">case</span><span style="COLOR: #000000">&nbsp;&nbsp;CodeType.CSharp:<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;provider</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CSharpCodeProvider();<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">break</span><span style="COLOR: #000000">;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">case</span><span style="COLOR: #000000">&nbsp;CodeType.VB:<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;provider</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;VBCodeProvider();<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">break</span><span style="COLOR: #000000">;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">case</span><span style="COLOR: #000000">&nbsp;CodeType.JSharp:<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;provider</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;VJSharpCodeProvider();<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">break</span><span style="COLOR: #000000">;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">default</span><span style="COLOR: #000000">:<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;provider</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CSharpCodeProvider();<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">break</span><span style="COLOR: #000000">;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ICodeGenerator&nbsp;gen</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">provider.CreateGenerator();<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IndentedTextWriter&nbsp;tw&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;IndentedTextWriter(textWriter,&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CodeGeneratorOptions&nbsp;cgo</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;CodeGeneratorOptions()&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cgo.BlankLinesBetweenMembers&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cgo.BracingStyle</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">C</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cgo.ElseOnClosing</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;gen.GenerateCodeFromCompileUnit(Build(nameSpace,itemTypeName,collectionClassName),&nbsp;tw,&nbsp;cgo);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tw.Close();<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="COLOR: #000000"><br><img id="Codehighlighter1_29684_29979_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_29684_29979_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top" style="DISPLAY: none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_29684_29979_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</span><span id="Codehighlighter1_29684_29979_Open_Text"><span style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;</span><span style="COLOR: #808080">&lt;summary&gt;</span><span style="COLOR: #008000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;生成指定的类型的强类型集合<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;</span><span style="COLOR: #808080">&lt;/summary&gt;</span><span style="COLOR: #008000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;</span><span style="COLOR: #808080">&lt;param&nbsp;name="itemTypeName"&gt;</span><span style="COLOR: #008000">集合中的元素的类型</span><span style="COLOR: #808080">&lt;/param&gt;</span><span style="COLOR: #008000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;</span><span style="COLOR: #808080">&lt;param&nbsp;name="nameSpace"&gt;</span><span style="COLOR: #008000">代码所在的命名空间</span><span style="COLOR: #808080">&lt;/param&gt;</span><span style="COLOR: #008000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;</span><span style="COLOR: #808080">&lt;param&nbsp;name="collectionClassName"&gt;</span><span style="COLOR: #008000">集合类的名称</span><span style="COLOR: #808080">&lt;/param&gt;</span><span style="COLOR: #008000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;</span><span style="COLOR: #808080">&lt;param&nbsp;name="codeType"&gt;</span><span style="COLOR: #008000">代码的类型</span><span style="COLOR: #808080">&lt;/param&gt;</span><span style="COLOR: #008000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;</span><span style="COLOR: #808080">&lt;param&nbsp;name="fileName"&gt;</span><span style="COLOR: #008000">要生成的指定的文件名</span><span style="COLOR: #808080">&lt;/param&gt;</span><span style="COLOR: #808080"></span></span><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">static</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000">&nbsp;Make(</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">&nbsp;itemTypeName,</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">&nbsp;nameSpace,</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">&nbsp;collectionClassName,CodeType&nbsp;codeType,</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">&nbsp;fileName)<br><img id="Codehighlighter1_30107_30244_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_30107_30244_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top" style="display: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_30107_30244_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/dot.gif"></span><span id="Codehighlighter1_30107_30244_Open_Text"><span style="COLOR: #000000">{<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TextWriter&nbsp;tw</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;StreamWriter(fileName,&nbsp;</span><span style="COLOR: #0000ff">false</span><span style="COLOR: #000000">);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Make(itemTypeName,nameSpace,collectionClassName,codeType,tw);<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tw.Close();<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="COLOR: #000000"><br><img id="Codehighlighter1_30248_30529_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_30248_30529_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top" style="display: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_30248_30529_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</span><span id="Codehighlighter1_30248_30529_Open_Text"><span style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;</span><span style="COLOR: #808080">&lt;summary&gt;</span><span style="COLOR: #008000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;生成指定的类型的强类型集合<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;</span><span style="COLOR: #808080">&lt;/summary&gt;</span><span style="COLOR: #008000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;</span><span style="COLOR: #808080">&lt;param&nbsp;name="itemTypeName"&gt;</span><span style="COLOR: #008000">集合中的元素的类型</span><span style="COLOR: #808080">&lt;/param&gt;</span><span style="COLOR: #008000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;</span><span style="COLOR: #808080">&lt;param&nbsp;name="nameSpace"&gt;</span><span style="COLOR: #008000">代码所在的命名空间</span><span style="COLOR: #808080">&lt;/param&gt;</span><span style="COLOR: #008000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;</span><span style="COLOR: #808080">&lt;param&nbsp;name="collectionClassName"&gt;</span><span style="COLOR: #008000">集合类的名称</span><span style="COLOR: #808080">&lt;/param&gt;</span><span style="COLOR: #008000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;</span><span style="COLOR: #808080">&lt;param&nbsp;name="codeType"&gt;</span><span style="COLOR: #008000">代码的类型</span><span style="COLOR: #808080">&lt;/param&gt;</span><span style="COLOR: #008000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;</span><span style="COLOR: #808080">&lt;returns&gt;</span><span style="COLOR: #008000">请类型集合的代码</span><span style="COLOR: #808080">&lt;/returns&gt;</span><span style="COLOR: #808080"></span></span><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">static</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">&nbsp;&nbsp;Make(</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">&nbsp;itemTypeName,</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">&nbsp;nameSpace,</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">&nbsp;collectionClassName,CodeType&nbsp;codeType)<br><img id="Codehighlighter1_30644_31016_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_30644_31016_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top" style="display: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_30644_31016_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/dot.gif"></span><span id="Codehighlighter1_30644_31016_Open_Text"><span style="COLOR: #000000">{<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">&nbsp;tempfile</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">System.IO.Path.GetTempFileName();<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;StrongTypeCollection.Make(itemTypeName&nbsp;,nameSpace&nbsp;,&nbsp;collectionClassName&nbsp;,codeType,tempfile)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">&nbsp;Result</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">""</span><span style="COLOR: #000000">;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">using</span><span style="COLOR: #000000">&nbsp;(StreamReader&nbsp;sr&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;StreamReader(tempfile))&nbsp;<br><img id="Codehighlighter1_30877_30957_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_30877_30957_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top" style="display: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_30877_30957_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/dot.gif"></span><span id="Codehighlighter1_30877_30957_Open_Text"><span style="COLOR: #000000">{<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">for</span><span style="COLOR: #000000">(</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000">&nbsp;i</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;i</span><span style="COLOR: #000000">&lt;</span><span style="COLOR: #000000">9</span><span style="COLOR: #000000">;i</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">)<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sr.ReadLine();&nbsp;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Result&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">sr.ReadToEnd();&nbsp;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.IO.File.Delete(tempfile)&nbsp;;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000">&nbsp;Result;<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img id="Codehighlighter1_31022_31064_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_31022_31064_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top" style="display: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_31022_31064_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</span><span id="Codehighlighter1_31022_31064_Open_Text"><span style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;</span><span style="COLOR: #808080">&lt;summary&gt;</span><span style="COLOR: #008000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;代码的类型<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;</span><span style="COLOR: #808080">&lt;/summary&gt;</span><span style="COLOR: #808080"></span></span><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">enum</span><span style="COLOR: #000000">&nbsp;CodeType<br><img id="Codehighlighter1_31090_31261_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_31090_31261_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top" style="display: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_31090_31261_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/dot.gif"></span><span id="Codehighlighter1_31090_31261_Open_Text"><span style="COLOR: #000000">{<br><img id="Codehighlighter1_31095_31136_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_31095_31136_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top" style="display: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_31095_31136_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</span><span id="Codehighlighter1_31095_31136_Open_Text"><span style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;</span><span style="COLOR: #808080">&lt;summary&gt;</span><span style="COLOR: #008000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;C#<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;</span><span style="COLOR: #808080">&lt;/summary&gt;</span><span style="COLOR: #808080"></span></span><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CSharp,<br><img id="Codehighlighter1_31151_31196_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_31151_31196_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top" style="display: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_31151_31196_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</span><span id="Codehighlighter1_31151_31196_Open_Text"><span style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;</span><span style="COLOR: #808080">&lt;summary&gt;</span><span style="COLOR: #008000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;VB.NET<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;</span><span style="COLOR: #808080">&lt;/summary&gt;</span><span style="COLOR: #808080"></span></span><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VB,<br><img id="Codehighlighter1_31207_31248_Open_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_31207_31248_Closed_Image" onclick="code_collapse_toggle(this);" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ContractedSubBlock.gif" align="top" style="display: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_31207_31248_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</span><span id="Codehighlighter1_31207_31248_Open_Text"><span style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;</span><span style="COLOR: #808080">&lt;summary&gt;</span><span style="COLOR: #008000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;J#<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;</span><span style="COLOR: #808080">&lt;/summary&gt;</span><span style="COLOR: #808080"></span></span><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;JSharp<br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InBlock.gif" align="top"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/ExpandedBlockEnd.gif" align="top">}</span></span><span style="COLOR: #000000"><br><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/None.gif" align="top"></span> 
    </div>
</div><br><br>完整代码下载地址：<a href="http://files.cnblogs.com/twodays/CollectionMaker.rar">http://files.cnblogs.com/twodays/CollectionMaker.rar<br></a>编译好的程序下载地址：<a href="http://files.cnblogs.com/twodays/CollectionMaker.zip">http://files.cnblogs.com/twodays/CollectionMaker.zip</a></div><div id="MySignature"></div>
<div class="clear"></div>
<div id="blog_post_info_block">
<div id="BlogPostCategory">分类: <a href="http://www.cnblogs.com/twodays/category/5080.html">.NET技术</a></div>
<div id="EntryTag"></div>
<div id="blog_post_info"><div id="green_channel">
绿色通道：
<a href="javascript:void(0);" id="green_channel_digg" onclick="DiggIt(62226,cb_blogId,1);green_channel_success(this,&#39;谢谢推荐！&#39;);">好文要顶</a>
<a id="green_channel_follow" onclick="c_follow();" href="javascript:void(0);">关注我</a>
<a id="green_channel_favorite" onclick="AddToWz(cb_entryId);return false;" href="javascript:void(0);">收藏该文</a><a id="green_channel_contact" href="http://space.cnblogs.com/msg/send/%e8%a2%ab%e9%81%97%e5%bc%83%e7%9a%84%e5%b0%8f%e6%8c%87" target="_blank">与我联系</a>
<a id="green_channel_weibo" href="javascript:void(0);" title="分享至新浪微博" onclick="ShareToTsina()"><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/icon_weibo_24.png" alt=""></a>
</div>
<div id="author_profile">
<div id="author_profile_info" class="author_profile_info">
<a href="http://home.cnblogs.com/u/twodays/" target="_blank"><img src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/u1394.jpg" class="author_avatar" alt=""></a>
<div id="author_profile_detail" class="author_profile_info">
<a href="http://home.cnblogs.com/u/twodays/">被遗弃的小指</a><br>
<a href="http://home.cnblogs.com/u/twodays/followees">关注 - 0</a><br>
<a href="http://home.cnblogs.com/u/twodays/followers">粉丝 - 50</a>
</div>
</div>
<div class="clear"></div>
<div id="author_profile_honor">荣誉：<a href="http://www.cnblogs.com/expert/" target="_blank">推荐博客</a></div>
<div id="author_profile_follow">
    <a href="javascript:void(0);" onclick="c_follow();return false;">+加关注</a>
</div>
</div>
<div id="div_digg">										
    <div class="diggit" onclick="votePost(62226,&#39;Digg&#39;)">
        <span class="diggnum" id="digg_count">0</span>
    </div>
	<div class="buryit" onclick="votePost(62226,&#39;Bury&#39;)"> 
		<span class="burynum" id="bury_count">0</span>
	</div>
	<div class="clear"></div>	
	<div class="diggword" id="digg_tips">
    (请您对文章做出评价)
    </div>	
</div>
</div>
<div class="clear"></div>
<div id="post_next_prev"><a href="http://www.cnblogs.com/twodays/archive/2004/07/22/26441.html" class="p_n_p_prefix">« </a> 上一篇：<a href="http://www.cnblogs.com/twodays/archive/2004/07/22/26441.html" title="发布于2004-07-22 10:24">哪位老大帮我看看这是怎么回事儿？</a><br><a href="http://www.cnblogs.com/twodays/archive/2005/02/19/106163.html" class="p_n_p_prefix">» </a> 下一篇：<a href="http://www.cnblogs.com/twodays/archive/2005/02/19/106163.html" title="发布于2005-02-19 22:00">“基于.NET CF的火车时刻查询器”试用邀请 兼开发手记</a><br></div>
</div>

</div>
	</div><a name="!comments"></a><div id="blog-comments-placeholder"><div id="comments_pager_top"></div>
<h3>Feedback</h3>
	
			<div class="post">
				<div class="posthead">
					<h2>
						<a href="http://www.cnblogs.com/twodays/archive/2004/11/10/62226.html#62568" class="layer">#1楼</a><a name="62568" id="comment_anchor_62568"></a>
						&nbsp;&nbsp;<span class="comment_actions"><a href="javascript:void(0);" onclick="return ReplyComment(62568,&#39;&#39;)">回复</a><a href="javascript:void(0);" onclick="return QuoteComment(62568,&#39;&#39;)">引用</a></span>
					</h2>
					 <span class="comment_date">2004-11-11 10:27</span> by <a id="ctl00_CommentList_NameLink_0" href="http://www.cnitblog.com/r.aspx?url=http://blog.csdn.net/upto/" rel="nofllow" target="_blank">upto[未注册用户]</a>
				</div>
				<div class="postbody"><div id="comment_body_62568" class="blog_comment_body">good job!</div></div>
			</div>
		
			<div class="post">
				<div class="posthead">
					<h2>
						<a href="http://www.cnblogs.com/twodays/archive/2004/11/10/62226.html#88510" class="layer">#2楼</a><a name="88510" id="comment_anchor_88510"></a>
						&nbsp;&nbsp;<span class="comment_actions"><a href="javascript:void(0);" onclick="return ReplyComment(88510,&#39;&#39;)">回复</a><a href="javascript:void(0);" onclick="return QuoteComment(88510,&#39;&#39;)">引用</a></span>
					</h2>
					 <span class="comment_date">2005-01-08 03:12</span> by <a id="ctl00_CommentList_NameLink_1" href="http://www.cnitblog.com/r.aspx?url=http://heshengsheng.blogone.net" rel="nofllow" target="_blank">何生生[未注册用户]</a>
				</div>
				<div class="postbody"><div id="comment_body_88510" class="blog_comment_body">我靠，你这博克太牛了，我完全看不懂……</div></div>
			</div>
		
			<div class="post">
				<div class="posthead">
					<h2>
						<a href="http://www.cnblogs.com/twodays/archive/2004/11/10/62226.html#91157" class="layer">#3楼</a><a name="91157" id="comment_anchor_91157"></a>
						&nbsp;&nbsp;<span class="comment_actions"><a href="javascript:void(0);" onclick="return ReplyComment(91157,&#39;&#39;)">回复</a><a href="javascript:void(0);" onclick="return QuoteComment(91157,&#39;&#39;)">引用</a></span>
					</h2>
					 <span class="comment_date">2005-01-13 10:11</span> by <a id="ctl00_CommentList_NameLink_2" target="_blank">赵桂林</a>
				</div>
				<div class="postbody"><div id="comment_body_91157" class="blog_comment_body">您好：请问我想在生成的代码中有如下的一段“where name＝'{0}' and password='{1}' ”,可是我生成的.cs文件中生成的确实“where name＝\'{0}\' and password=\'{1}\' ”,请问我该怎么弄呀？</div></div>
			</div>
		
			<div class="post">
				<div class="posthead">
					<h2>
						<a href="http://www.cnblogs.com/twodays/archive/2004/11/10/62226.html#91709" class="layer">#4楼</a><a name="91709" id="comment_anchor_91709"></a>[<span class="louzhu">楼主</span>]
						&nbsp;&nbsp;<span class="comment_actions"><a href="javascript:void(0);" onclick="return ReplyComment(91709,&#39;xVUgwT9odFPc3OLGoE5lk7iMB9GR+r2+CgXDEzpKrlFBA+0CuHgxZA==&#39;)">回复</a><a href="javascript:void(0);" onclick="return QuoteComment(91709,&#39;xVUgwT9odFPc3OLGoE5lk7iMB9GR+r2+CgXDEzpKrlFBA+0CuHgxZA==&#39;)">引用</a></span>
					</h2>
					 <span class="comment_date">2005-01-14 09:57</span> by <a id="a_comment_author_91709" href="http://www.cnblogs.com/twodays/" target="_blank">被遗弃的小指</a> <a href="http://msg.cnblogs.com/msg/send/%e8%a2%ab%e9%81%97%e5%bc%83%e7%9a%84%e5%b0%8f%e6%8c%87" title="发送站内短消息" class="sendMsg2This">&nbsp;</a>
				</div>
				<div class="postbody"><div id="comment_body_91709" class="blog_comment_body">你生成的这个“where name＝\'{0}\' and password=\'{1}\'”不可能是直接的C#代码吧？应该是在某一个字符串中的值吧？如果是字符串中的值的话，那么\'应该是转义字符，没有问题的，他的实际值里面是不包含那个反斜杠的。</div><div class="comment_vote"><a href="javascript:void(0);" class="comment_digg" onclick="return voteComment(91709,&#39;Digg&#39;,this)">支持(0)</a><a href="javascript:void(0);" class="comment_bury" onclick="return voteComment(91709,&#39;Bury&#39;,this)">反对(0)</a></div><span id="comment_91709_avatar" style="display:none;">http://pic.cnitblog.com/face/u1394.jpg</span></div>
			</div>
		
			<div class="post">
				<div class="posthead">
					<h2>
						<a href="http://www.cnblogs.com/twodays/archive/2004/11/10/62226.html#134028" class="layer">#5楼</a><a name="134028" id="comment_anchor_134028"></a>
						&nbsp;&nbsp;<span class="comment_actions"><a href="javascript:void(0);" onclick="return ReplyComment(134028,&#39;&#39;)">回复</a><a href="javascript:void(0);" onclick="return QuoteComment(134028,&#39;&#39;)">引用</a></span>
					</h2>
					 <span class="comment_date">2005-04-08 13:21</span> by <a id="ctl00_CommentList_NameLink_4" target="_blank">cityyokel</a>
				</div>
				<div class="postbody"><div id="comment_body_134028" class="blog_comment_body">nice job！
<br>
<br>但是，生成的集合类没有验证输入对象是否是所要的类型，就靠几个强制转换有点不够安全。
<br>
<br>再多重载几个函数吧OnInsert，OnRemove， OnSet，OnValidate</div></div>
			</div>
		
			<div class="post">
				<div class="posthead">
					<h2>
						<a href="http://www.cnblogs.com/twodays/archive/2004/11/10/62226.html#212393" class="layer">#6楼</a><a name="212393" id="comment_anchor_212393"></a><span id="comment-maxId" style="display:none;">212393</span><span id="comment-maxDate" style="display:none;">2005/8/11 12:00:00</span>
						&nbsp;&nbsp;<span class="comment_actions"><a href="javascript:void(0);" onclick="return ReplyComment(212393,&#39;&#39;)">回复</a><a href="javascript:void(0);" onclick="return QuoteComment(212393,&#39;&#39;)">引用</a></span>
					</h2>
					 <span class="comment_date">2005-08-11 12:00</span> by <a id="ctl00_CommentList_NameLink_5" href="http://www.cnitblog.com/r.aspx?url=http://Codedom%E4%B8%AD%E7%94%9F%E6%88%90region%E6%8C%87%E4%BB%A4" rel="nofllow" target="_blank">chen8167[未注册用户]</a>
				</div>
				<div class="postbody"><div id="comment_body_212393" class="blog_comment_body">例如:
<br>  我想生成下述代码
<br>  :
<br>   #region 方法 一
<br>  public void method1(string a)
<br>   {
<br>      // 具体的代码
<br>  }
<br>#endregion
<br>
<br>也就是怎么给这个方法加上#region 和#endregion</div></div>
			</div>
		<div id="comments_pager_bottom"></div></div><script type="text/javascript">var commentManager = new blogCommentManager();commentManager.renderComments(0);</script>
<div id="comment_form" class="commentform">
<a name="commentform"></a>
<div id="divCommentShow"></div>
<div id="comment_nav"><span id="span_refresh_tips"></span><a href="javascript:void(0);" id="lnk_RefreshComments" onclick="return RefreshCommentList();">刷新评论</a><a href="http://www.cnblogs.com/twodays/archive/2004/11/10/62226.html#" onclick="return RefreshPage();">刷新页面</a><a href="http://www.cnblogs.com/twodays/archive/2004/11/10/62226.html#top">返回顶部</a></div>
<div id="comment_form_container"><div id="commentform_title">发表评论</div>
<span id="tip_comment" style="color:Red"></span>
<p>
昵称：<input type="text" id="tbCommentAuthor" class="author" disabled="disabled" size="50" value="window5549-accp">
</p>
<div class="commentbox_main">
<div class="commentbox_title">
<div class="commentbox_title_left">评论内容：</div>
<div class="commentbox_title_right">
<img id="ubb_quote" class="comment_icon" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/quote.gif" alt="引用" title="添加引用" onclick="insertUBB(&#39;tbCommentBody&#39;,&#39;quote&#39;)">
<img id="ubb_bold" class="comment_icon" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/b.png" alt="粗体" title="添加粗体" onclick="insertUBB(&#39;tbCommentBody&#39;,&#39;b&#39;)">
<img id="ubb_url" class="comment_icon" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/lk.png" alt="链接" title="添加链接" onclick="insertUbbUrl(&#39;tbCommentBody&#39;)">
<img id="ubb_indent" class="comment_icon" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/indent.png" alt="缩进" title="添加首行缩进" onclick="insertIndent(&#39;tbCommentBody&#39;)">
<img id="ubb_code" class="comment_icon" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/InsertCode.gif" alt="代码" title="添加代码" onclick="insertUbbCode()">
<img id="ubb_img" class="comment_icon" src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/img.gif" alt="图片" title="上传图片" onclick="OpenImageUploadWindow();">
</div>
</div>
<div class="clear"></div>
<textarea id="tbCommentBody" class="comment_textarea" rows="20" cols="50"></textarea>
</div>
<p id="commentbox_opt">
<input id="btn_comment_submit" type="button" class="comment_btn" value="提交评论">
<span id="span_comment_canceledit" style="display:none"><a href="javascript:void(0);" onclick="return CancelCommentEdit()">不改了</a></span>
<a href="javascript:void(0);" onclick="return logout();">注销</a>
        <a id="commentbox_opt_sub" href="javascript:void(0);" title="订阅后有新评论时会邮件通知您" onclick="commentManager.Subscribe()">订阅评论</a>
</p>
<p>
[使用Ctrl+Enter键快速提交]
</p>
<div style="display:none">
<span id="comment_edit_id"></span><span id="span_parentcomment_id"></span>
<span id="span_parent_id"></span>
<span id="span_comment_replyto"></span>
<span id="span_comment_posted"></span>
</div>
</div>
<div class="ad_text_commentbox" id="ad_text_under_commentbox"></div>
<div id="site_nav_under"><a href="http://www.imooc.com/view/150?from=cnblogs" target="_blank"><b>【免费课程】分享：站在巨人的肩膀上写代码—SPL</b></a><br><a href="http://zt.cnblogs.com/tingyun/" target="_blank">听云APP性能监测——终结移动App性能黑洞</a><br><a href="http://oneapm.com/events/ironman.html?hmsr=%E5%8D%9A%E5%AE%A2%E5%9B%AD&hmmd=%E6%96%87%E7%AB%A0%E5%86%85%E9%A1%B5%E6%96%87%E5%AD%97%E9%93%BE&hmpl=&hmkw=&hmci=" target="_blank">100%有礼！机械键盘、钢铁侠T恤免费拿！OneAPM送福利！</a><br><a href="http://www.rongcloud.cn/promotion/" target="_blank">融云，免费为你的App加入IM功能——让你的App“聊”起来！！</a></div>
<div id="opt_under_post"></div>
<script type="text/javascript">
    var enableGoogleAd = canShowAdsense(); var googletag = googletag || {}; googletag.cmd = googletag.cmd || [];
    fixPostBodyFormat();
</script>
<div id="ad_under_post_holder">
<script type="text/javascript">
    var googletag = googletag || {};
    googletag.cmd = googletag.cmd || [];
    (function () {
        if (enableGoogleAd) {
            var gads = document.createElement('script');
            gads.async = true;
            gads.type = 'text/javascript';
            var useSSL = 'https:' == document.location.protocol;
            gads.src = (useSSL ? 'https:' : 'http:') + '//www.googletagservices.com/tag/js/gpt.js';
            var node = document.getElementsByTagName('script')[0];
            node.parentNode.insertBefore(gads, node);
        }
    })();
</script>
<script type="text/javascript">
    try {
        if (enableGoogleAd) {
            googletag.cmd.push(function () {
                googletag.defineSlot('/1090369/cnblogs_blogpost_C1_sitehome', [300, 250], 'div-gpt-ad-1346480159711-0').addService(googletag.pubads());
                googletag.defineSlot('/1090369/cnblogs_blogpost_C2', [468, 60], 'div-gpt-ad-1410860226396-0').addService(googletag.pubads());
                googletag.pubads().enableSingleRequest();
                googletag.enableServices();
            });
        };
    } catch (e) { }
</script>
<div id="google_ad_c1" class="c_ad_block">
    <div id="div-gpt-ad-1346480159711-0" style="width:300px; height:250px;">
    <script type="text/javascript">
        try {
            if (enableGoogleAd) {
                googletag.cmd.push(function () { googletag.display('div-gpt-ad-1346480159711-0'); });            
            } else {
                $('#div-gpt-ad-1346480159711-0').hide();
            }
    } catch (e) { }
    </script>
    <div id="google_ads_iframe_/1090369/cnblogs_blogpost_C1_sitehome_0__container__" style="border: 0pt none;"><iframe id="google_ads_iframe_/1090369/cnblogs_blogpost_C1_sitehome_0" name="google_ads_iframe_/1090369/cnblogs_blogpost_C1_sitehome_0" width="300" height="250" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" src="javascript:"<html><body style='background:transparent'></body></html>"" style="border: 0px; vertical-align: bottom;"></iframe></div><iframe id="google_ads_iframe_/1090369/cnblogs_blogpost_C1_sitehome_0__hidden__" name="google_ads_iframe_/1090369/cnblogs_blogpost_C1_sitehome_0__hidden__" width="0" height="0" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" src="javascript:"<html><body style='background:transparent'></body></html>"" style="border: 0px; vertical-align: bottom; visibility: hidden; display: none;"></iframe></div>
</div>
</div>
<div id="under_post_news"><div class="itnews c_ad_block"><b>最新IT新闻</b>:<br> ·  <a href="http://news.cnblogs.com/n/504624/" target="_blank">亚马逊为修正虚拟机漏洞重启EC2</a><br> ·  <a href="http://news.cnblogs.com/n/504623/" target="_blank">Vertu中国再发新机：1部换10部iPhone 6</a><br> ·  <a href="http://news.cnblogs.com/n/504622/" target="_blank">地球之水比太阳更古老</a><br> ·  <a href="http://news.cnblogs.com/n/504621/" target="_blank">入手国行Xbox One的N个理由 亮点在最后</a><br> ·  <a href="http://news.cnblogs.com/n/504620/" target="_blank">Adobe在中国为啥混不下去了？</a><br>» <a href="http://news.cnblogs.com/" title="IT新闻" target="_blank">更多新闻...</a></div></div>
<div id="google_ad_c2" class="c_ad_block">
<div id="div-gpt-ad-1410860226396-0" style="width:468px; height:60px;">
<script type="text/javascript">
try {
    if (enableGoogleAd) {
        googletag.cmd.push(function () { googletag.display('div-gpt-ad-1410860226396-0'); });
    } else {
        $('#div-gpt-ad-1346480159711-0').hide();
    }
} catch (e) { }
</script>
<div id="google_ads_iframe_/1090369/cnblogs_blogpost_C2_0__container__" style="border: 0pt none;"><iframe id="google_ads_iframe_/1090369/cnblogs_blogpost_C2_0" name="google_ads_iframe_/1090369/cnblogs_blogpost_C2_0" width="468" height="60" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" src="javascript:"<html><body style='background:transparent'></body></html>"" style="border: 0px; vertical-align: bottom;"></iframe></div></div>
</div>
<div id="under_post_kb"><div class="itnews c_ad_block" id="kb_block"><b>最新知识库文章</b>:<br><div id="kb_recent"> ·  <a href="http://kb.cnblogs.com/page/504518/" target="_blank">构建高可伸缩性的WEB交互式系统（下）</a><br> ·  <a href="http://kb.cnblogs.com/page/504459/" target="_blank">谈谈网站测试中的AB测试方法</a><br> ·  <a href="http://kb.cnblogs.com/page/504453/" target="_blank">你在支配钱，还是钱在支配你？</a><br> ·  <a href="http://kb.cnblogs.com/page/504360/" target="_blank">关于技术变化方面的五种思想</a><br> ·  <a href="http://kb.cnblogs.com/page/504228/" target="_blank">图解SSL/TLS协议</a><br></div>» <a href="http://kb.cnblogs.com/" target="_blank">更多知识库文章...</a></div></div>
<div id="HistoryToday" class="c_ad_block"></div>
<script type="text/javascript">
$(function () {
    loadNewsAndKb();
    loadBlogSignature();
    LoadPostInfoBlock(cb_blogId, cb_entryId, cb_blogApp, cb_blogUserGuid);
    GetPrevNextPost(cb_entryId, cb_blogId, cb_entryCreatedDate);
    loadOptUnderPost();
    GetHistoryToday(cb_blogId, cb_blogApp, cb_entryCreatedDate);
    setTimeout(function () { incrementViewCount(cb_entryId); }, 200);
});
</script><iframe src="./CodeDOM：集合类生成器 - 被遗弃的小指 - 博客园_files/container.htm" style="visibility: hidden; display: none;"></iframe>
</div>

			</div>
		</td>
	</tr>
	<tr>
		<td colspan="2" class="FooterCell">
			
<p id="footer">
	Powered by: 
	<br>
	
	<a id="Footer1_Hyperlink3" name="Hyperlink1" href="http://www.cnblogs.com/" style="font-family:Verdana;font-size:12px;">博客园</a>
	<br>
	Copyright © 被遗弃的小指
</p>

		</td>
	</tr>
</tbody></table>



<iframe id="google_osd_static_frame_8781486509833" name="google_osd_static_frame" style="display: none; width: 0px; height: 0px;"></iframe></body></html>